Question

I've been using the NuGet Package Manager in Visual Studio 2010 to add third party dependencies to our projects such as NUnit, Elmah etc. By default these are installed to the packages folder at the same level as the sln file.

Is there anyway of controlling where this folder gets created and ideally have the package folder automatically added to version control. I know I can move the folder to our current lib folder manually but I'd rather configure the devenv to do this if possible to ensure we can do upgrades through Package Manager.

Thanks.

Was it helpful?

Solution

Honestly, it's a great feature suggestion for the Visual Studio team owning NuGet. I would love to see TFS understand about NuGet dependencies and handle them appropriately for developers enlisting in the project and for build servers wanting to compile using NuGet dependencies.

OTHER TIPS

There is a discussion about this topic at http://nuget.codeplex.com/discussions/236592.

In the current version, the package folder is added to the version control settings automatically. So for me, the NuGet packages are checked into version control and added to the build as long as I don't filter my pending changes pane down to just the solution items.

However, there isn't a folder or object in the Solution Explorer for it, so if you filter you pending changes just to solution items then the packages won't be checked in. I'm not sure how the NuGet packages should be handled in the SolutionExplorer. At the project level, you can add a I'd like to see some setting in the solution to handle that--I'm not sure if it should be a feature of the solution file or of NuGet.

If it's a solution item, the Visual Studio version control code will probably give you easier configurability.

You can use a flag in the NuGet command line to set the package folder you want ("-o "), but it doesn't seem to exist anywhere in the package manager or the add library package dialog box or Visual Studio Package Manager Settings.

I'd suggest joining in the "http://nuget.codeplex.com/discussions/236592" thread for NuGet suggestions, or submitting feedback over at http://connect.microsoft.com/VisualStudio to let the team know how you'd like it handled in the Solution Explorer/sln file.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top