Reputation: 137574
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.
Upvotes: 2
Views: 178
Reputation: 137574
Frustratingly, NuGet pays little attention to .nuget\nuget.config
, ignoring any <packageSources>
element. The solution to my problem was to edit .nuget\NuGet.targets
and add the feed URLs to its <packageSources>
element. Spuriously, this element has a different syntax—don't use <add key
but instead put the feed URLs in quotes, separated by semi-colons.
<PackageSources>"http://melbourne.local/NuGetServer/nuget";"http://nuget.bizness.local"</PackageSources>
This issue on the NuGet bug tracker
Upvotes: 1