← back to the blog


A note for Visual Studio Nuget ignore packages folder

Posted in Visual Studio by dake

Add files, folder to ignore nuget packages folder.

If you use NuGet and build solution visual studio will get dll and download to packages folder, you don't want to check-in packages folder files/folder to your source control. Following is a note for ignoring NuGet packages folder.At your visual studio solution, add

At your visual studio solution, add .tfignore file, .nuget folder, and NuGet.config file.

  • Create .nuget folder and add Nuget.config file to the .nuget folder
  • create .tfignore file

NuGet.config


<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <solution>
    <add key="disableSourceControlIntegration" value="true" />
  </solution>
</configuration>

.tfignore


\packages

Now, when you try to check-in, file/folder under packages folder won't show to your tfs pending changes.