I didn’t want to add the NuGet packages of my Visual Studio solution to TFS, because I download all NuGet packages during build.

 

image

 

To exclude all NuGet packages from TFS:

  • Add a folder “.nuget” to the folder that also contains the “packages” folder and in most cases the “solution file”.
    • add a file to the “.nuget” folder with the name “NuGet.config”
      • contents of the file:
      • <?xml version="1.0" encoding="utf-8"?>
        <configuration>
          <solution>
            <add key="disableSourceControlIntegration" value="true" />
          </solution>
        </configuration>

  • Add a file “.tfignore”  to the folder that also contains the “packages” folder and in most cases the “solution file”.
    • contents of the file:
      • \packages

 

More information: http://stackoverflow.com/questions/26604506/tfs-vs-2013-ignore-all-nuget-packages

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.