TFS ignore NuGet packages

Using Visual Studio 2013 (update 4) with TFS Azure (as a service).

Two steps are required:

1. NuGet client has a bug (more info here) and adds packages to TFS Pending changes list. Stop this by adding \.nuget\nuget.config under solution folder (see download below).

2. TFS client automatically detects changes in the file system. Use \.tfignore (in solution folder) file for stopping TFS client detecting changes under packages folder.


Downlod zip-file including the files required – namely nuget.config and .tfignore. Unpack it into the solution folder.

Restart VS

Restart Visual Studio after unpacking the files.
It is likely that you have to UNDO the current Pending changes for packages folder (first time only).

4 thoughts on “TFS ignore NuGet packages”

  1. Works really great for packages folder. Thanks.

    I tried something like this, hoping to exclude everything in the website project’s bin folder, except refresh. But didn’t work. Any ideas?


  2. Works great for packages folder. Thanks!

    I also try to exclude bin folder in a website project within the same solution. Added the following to the same .tfignore file, but didn’t work. Any clues?


  3. Your rules seem to be correct. Is it that the *.refresh files are not included in Pending changes? Or that other files in bin-folder are included? I have NO RULE to exclude bin in my solution, but bin is never included anyhow. There must be something else controlling this, too.

Leave a Reply

Your email address will not be published. Required fields are marked *