tabs ↹ over ␣ ␣ ␣ spaces

by Jiří {x2} Činčura

Using per solution/project NuGet package sources (in Visual Studio)

2 Jan 2013 1 mins NuGet, Visual Studio

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 (lib 😃).

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.

Profile Picture Jiří Činčura is .NET, C# and Firebird expert. He's focused on data and business layers, language constructs, parallelism, databases and performance. He's Microsoft Most Valuable Professional and frequent speaker. You can read his articles, guides and tips and tricks at www.tabsoverspaces.com.