We are using the NuGet workflow where packages are installed on build. We host a NuGet feed of our own. We currently instruct developers to add this feed to their Visual Studio installation in the package sources dialog. This is tiresome. How can we share our feed so that anyone who checks out the code can get the packages?
I tried copying the <packageSources> element from %appdata%\nuget\nuget.config to .nuget\nuget.config (this is where Visual Studio saves ‘package sources’) but Visual Studio threw a hissy fit.
Frustratingly, NuGet pays little attention to
.nuget\nuget.config, ignoring any<packageSources>element. The solution to my problem was to edit.nuget\NuGet.targetsand add the feed URLs to its<packageSources>element. Spuriously, this element has a different syntax—don’t use<add keybut instead put the feed URLs in quotes, separated by semi-colons.This issue on the NuGet bug tracker