Should the 'packages' folder with subfolders and 'repositories.config' be checked in to TFS ?

Jan 24, 2011 at 8:14 AM

Hello NuGet,

Probably this question has been asked several times, but I want to know if it's by design that I should add the 'packages' folder with all sub-folders and 'repositories.config' to TFS ?

Best regards,



Jan 24, 2011 at 9:04 AM

Yes it is. In the future we'll be looking into a command that allows for the workflow where that folder doesn't need to be in source control. More here

Jan 25, 2011 at 3:08 AM

Hi guys :)

I just jumped on the forums here to ask the exact same question. I've broken our latest build (again) because dll references can't be found for our team members who just got-latest ... because the packages folder (and i suppose rep.config also) hasn't been checked in.

Right now, are there any guidence and suggestions?

Eg. create a solution folder. Then create each and every subfolder and then add each and every file in the appropriate subfolder(s). Bleh @ manual process :(

Jan 26, 2011 at 7:34 AM

Getting the same issue here. The "Packages" folder is in the solution directory but isn't part of the solution. When developer A adds some new packages, does a successful compile and checks in all the files in the solution, the Packages folder is not part of this.

When developer B opens the solution and gets the latest version from source control, it immediately breaks because all the libraries in the source are missing.

It would be useful if the Wiki/docs could have a recommended method of how TFS and other source control solutions should be used with nugest?


Jan 26, 2011 at 1:22 PM
To be honest Howard, TFS is the only one with issues because it is focused on being used inside of Visual Studio. The rest of them are not tied to a product (and any IDE clients will still look at folder level in other SCMs) and instead look at the folder structure to update. I did hear that TFS11 will have local workspaces so that it will behave more like other SCMs.

But you are correct, it might be helpful explaining in the wiki somewhere how TFS behaves differently and how you can overcome those limitations to be able to use NuGet.

What I did in the past was create solution folders and add everything to visual studio so one could ensure everything would get pulled. It's a bit of a chore and subject to maintenance when updating packages, so I don't necessarily recommend it. There are other workarounds out there as well, but I haven't used TFS in nearly 3 years so I can't say what those would be.
Jan 26, 2011 at 5:56 PM

I was able to add a pre-build event that uses nuget.exe to install the required packages. It'd be nice if you could feed the existing packages.config to nuget.exe. It'd also be nice if you could use version ranges in the install command. Leaving the version option off, then it appears to grab the latest version, which is a good default for the CI scenario I'm envisioning.

Jan 26, 2011 at 6:07 PM

Whoops - not exactly. The HintPath in the reference is not being updated.

Mar 22, 2012 at 10:41 AM
Edited Mar 22, 2012 at 1:12 PM

I have the packages directory under source control but cannot for the life of me get MSBuild (run by TeamCity or from the command) to locate NuGet references to build. Visual Studio obviously builds fine. MSBuild just cannot resolve references with a <HintPath> of ../packages/etc it seems.


The package directory is present and correct at a folder above the pjoject I'm trying to build. I want the packages under source control because I don't want to install the assemblies into the GAC on the build server. Any ideas?