I was today trying to add new package source to be used. It’s a private feed from our TeamCity server that serves some shared libraries. I started with adding it in the Visual Studio settings. But that didn’t satisfy me. You know, I’d like to have it only for this particular project, not whole Visual Studio. And it turned out, it’s pretty simple. I’m already using
nuget.config file to put packages into custom named folder (
In this file you can add few elements and have another package source added.
<packageSources> <add key="FooBar package source" value="http://nuget.foobar.com/feed/" /> </packageSources> <activePackageSource> <add key="FooBar package source" value="http://nuget.foobar.com/feed/" /> </activePackageSource>
And it works with everything in Visual Studio. Not only in Package Manager Console. The VS settings contains the new feed, the Manage NuGet Packages works with it too.
Sweet. Well designed, NuGet.