Accessing private NuGet feeds from a Docker Compose build on Visual Studio Team Services

Photo by Linus Sandvide on Unsplash

First up, secure variables

Creating a NuGet.config file on demand

<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="MyFeed" value="https://myfeed" />
</packageSources>
<packageSourceCredentials>
<MyFeed>
<add key="Username" value="$(NuGetUsername)" />
<add key="ClearTextPassword" value="$(NuGetPassword)" />
</MyFeed>
</packageSourceCredentials>
</configuration>
echo '<?xml version="1.0" encoding="utf-8"?><configuration><packageSources><add key="MyFeed" value="https://myfeed" /></packageSources><packageSourceCredentials><MyFeed><add key="Username" value="$(NuGetUsername)" /><add key="ClearTextPassword" value="$(NuGetPassword)" /></MyFeed></packageSourceCredentials></configuration>' > NuGet.config
Skovhuggeren MTB trail, http://skovhuggeren.com

--

--

--

Software developer, mountain biker, https://sparre.io

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Cloud Security Fundamentals

Web3 onboarding as a service: technical details

Please leave us a review — Makers Day 34

How to build a website from scratch under the AWS free tier

Sidekick’s Task Manager: Maximize Your Time (Part 2)

Crucial factors for adopting a SaaS solution

10 Software Development Trends in 2021

5 WAYS TO FIND AND HIRE THE RIGHT APP DEVELOPER

Sample Cost Savings from Outsourcing

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Christian Sparre

Christian Sparre

Software developer, mountain biker, https://sparre.io

More from Medium

How to create your first Grafana Dashboard

How to create your first Grafana Dashboard

What is dev infrastructure for beginners (part 1): understanding

Automation with github actions

Cloud-based development for z/OS Connect OpenAPI3 APIs