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

怎甘沉沦 提交于 2020-01-11 04:58:07

问题


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?


回答1:


Make sure your nuget.config is configured like this:

<configuration>
  <config>
    <add key="repositoryPath" value="..\..\lib\packages" />
  </config>
</configuration>



回答2:


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.



来源:https://stackoverflow.com/questions/30335211/how-do-i-get-visual-studio-2015-rc-to-pick-up-the-repositorypath-setting-from-my

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!