Packages folder and TFS Source Control

Nov 16, 2011 at 3:34 PM

Is there a good way to keep the Packages folder out of TFS source control ? I went with a setup similar to and while folders/files are easily ignored with Mercurial, I'm not sure what people are doing with TFS if they don't want the packages themselves stored in source control. So far I am just deleting it out of source control after package changes but that certainly is not ideal.

Nov 16, 2011 at 5:14 PM

We added support for this in the current release -

Nov 16, 2011 at 6:20 PM

Correction, we added support for this in the upcoming release. This release is not yet out there, but we're working hard to release it soon.

Nov 16, 2011 at 6:41 PM

Great, thanks. It looks like it is in 1.6?  I have 1.6 installed via the CI build for another issue with proxy support. I'm not sure where the nuget config file is stored exactly just yet though but I can dig around and try it out assuming it is in 1.6.

Nov 16, 2011 at 6:51 PM

In 1.6, if you right click on the solution and set "Enable Package Restore", I believe it'll turn off TFS checking in packages.

Nov 16, 2011 at 7:53 PM

It still adds the Packages folder to source control. See I deleted the packages folder and rebuilt the solution and it is trying to add the Packages folder and repositories.config.


That is a nice feature though in that I no longer need my Tools folder in the solution with Nuget.exe and my custom pre-build events to invoke nuget for each project.

Nov 16, 2011 at 9:38 PM

I will say it does appear better though. I don't believe it is adding the dlls anymore though it sometimes still tries to add the Packages folder and repositories.config.


One downside to using Enable Package Restore (currently at least) is that it appeared to use an older version of Nuget.exe that didn't have the correct proxy support. See my comment on for more info. I assume this won't be an issue with 1.6 final but just in case...