Visual Studio 2015 Nuget.Config repositoryPath

So it looks like VS 2015 has changed (again) how they deal with Nuget management.  Now they no longer create the .nuget folder and the nuget.config file.

We still want to make use of the respositoryPath so to do this for new solutions create in VS 2015 we need to:

  1. Create a .nuget folder in the root of the solution (on the file system)
  2. Inside that folder, create a file NuGet.config. 
  3. In Visual Studio 2015, right click on the solution and add a new solution directory called “.nuget”
  4. Right click on that folder and select to add a new an existing file and select the NuGet.config file created in (2).
  5. Add content like this inside the NuGet.config file:

<?xml version=”1.0″ encoding=”utf-8″?>
<configuration>
  <solution>
    <add key=”disableSourceControlIntegration” value=”true” />
  </solution>
  <config>
    <add key=”repositoryPath” value=”..\..\..\..\NugetPackages” />
  </config>
</configuration>

Then reboot Visual Studio and it should work.