Avoid adding nuget packages to TFS 2012?

Topics: General
May 20, 2014 at 7:45 PM
Edited May 20, 2014 at 7:46 PM
Running VS2012, TFS2012, Nuget 2.8.50313.31. Even though we have disableSourceControlIntegration set to true, Visual Studio wants to add new nuget package references to source control. Why is this? How do we avoid it? Would be nice to not have to cloak the packages folder in TFS since we use Octopack 3.x.


Solution has .Nuget config folder with following Nuget.config
<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <solution>
    <add key="disableSourceControlIntegration" value="true" />
  </solution>
</configuration>
Further up the file system tree at our TFS trunk root, there is another nuget.config:
<!-- http://docs.nuget.org/docs/reference/nuget-config-settings : Nuget v2.8.x as of 5/19/2014 -->
<configuration>  
  <config>
    <!--
    <add key="disableSourceControlIntegration" value="true" />
    -->
    
    <add key="repositoryPath" value="packages\" />
  </config>
  
  <packageRestore>
    <!-- Allow NuGet to download missing packages -->
    <add key="enabled" value="True" />

    <!-- Automatically check for missing packages during build in Visual Studio -->
    <add key="automatic" value="True" />
  </packageRestore>
  
  <!-- Allows you to specify the list of sources to be used while looking for packages.  -->
  <packageSources>
    <add key="nuget.org" value="https://www.nuget.org/api/v2/" />
    <add key="nuget.criticaltech.com" value="\\devtest01\Nuget\acme" />
  </packageSources>
  
  <!-- Allows you to disable source control integration for the "Packages" folder. This key works at the solution level and hence need to be added to the NuGet.config file present in the "$(SolutionDir)\.nuget directory" -->
  <solution>
        <add key="disableSourceControlIntegration" value="true" />
  </solution>
  
</configuration>