Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Add NuGet Packages Folder to Solution File?

Nuget puts the package in my root folder(in my case my trunk folder). I am wondering is there a way to let VS 2010 know about this folder? I am using ankh svn to do my commuting so it would be really nice to have it in my solution so when I add a reference I can commit it from VS 2010 and not have to go to my trunk and manually do it.

Can this be done?

like image 314
chobo2 Avatar asked Jan 24 '11 00:01

chobo2


People also ask

Where are NuGet packages stored in a solution?

By default, NuGet restores packages into the packages folder in the solution root. This folder is shared between all solution projects. In some cases it is useful to change the location of the restored packages (for instance, to share them between several solutions).

How do I change the default location of a NuGet package?

Open %AppData%\NuGet folder, open existing NuGet. Config file. Edit repositoryPath key and set new destination.

Should packages folder be in Source Control?

Should I check in the Packages folder in the Source Control to make them available for peers? The answer is "NO". You should not checkin packages folders since this will increase the size of the repository and it will become overhead when taking the latest (since the size of the packages folder is in the MBs).


2 Answers

You may be interested in reading this NuGet doc:

Using NuGet without committing packages to source control

like image 172
Leniel Maccaferri Avatar answered Oct 01 '22 08:10

Leniel Maccaferri


The easiest way to do this currently is by using the Working Copy Explorer (View -> Working Copy Explorer). From here you can browse your solution folder, and add the reference.

I added the idea to enhance this to the AnkhSVN feedback forum, please go vote :-)

like image 36
Sander Rijken Avatar answered Oct 01 '22 09:10

Sander Rijken