Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I get Visual Studio 2015 RC to pick up the repositoryPath setting from my nuget.config?

We use a custom location for our packages folder which we specify in a nuget.config file in the same folder as our solution:

<settings>
<repositoryPath>..\..\lib\packages</repositoryPath>
</settings>

Visual Studio 2013 picks this up fine and the NuGet package manager installs packages into the specified folder, lists installed packages correctly, etc.

In Visual Studio 2015 RC the NuGet package manager pops up the "Some packages are missing from this solution, click here to restore" message and if I click the button it creates a new packages folder in the same folder as the solution rather than using the location specified in the nuget.config. Installing a completely new package also puts it into a packages folder under the solution folder rather than the specified one.

How do I get Visual Studio 2015 RC to respect the repository path specified in the nuget.config?

like image 620
Lawrence Johnston Avatar asked May 19 '15 20:05

Lawrence Johnston


2 Answers

Make sure your nuget.config is configured like this:

<configuration>
  <config>
    <add key="repositoryPath" value="..\..\lib\packages" />
  </config>
</configuration>
like image 175
Aleksey Avatar answered Oct 21 '22 05:10

Aleksey


I filed this bug with NuGet: https://github.com/NuGet/Home/issues/626

A fix has been made but I'm not sure when it will be released.

like image 32
Lawrence Johnston Avatar answered Oct 21 '22 03:10

Lawrence Johnston