如何让 Visual Studio 2015 RC 从我的 nuget.config 中获取 repositoryPath 设置? [英] How do I get Visual Studio 2015 RC to pick up the repositoryPath setting from my nuget.config?

查看:48
本文介绍了如何让 Visual Studio 2015 RC 从我的 nuget.config 中获取 repositoryPath 设置?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们为包文件夹使用自定义位置,我们在与解决方案相同的文件夹中的 nuget.config 文件中指定该位置:

<repositoryPath>..\..\lib\packages</repositoryPath></设置>

Visual Studio 2013 很好地选择了这一点,NuGet 包管理器将包安装到指定的文件夹中,正确列出已安装的包等.

在 Visual Studio 2015 RC 中,NuGet 包管理器会弹出此解决方案中缺少某些包,单击此处还原"消息,如果我单击该按钮,它会在与解决方案相同的文件夹中创建一个新的包文件夹,而不是而不是使用 nuget.config 中指定的位置.安装一个全新的包也会将其放入解决方案文件夹下的包文件夹中,而不是指定的文件夹中.

如何让 Visual Studio 2015 RC 遵守 nuget.config 中指定的存储库路径?

解决方案

确保您的 nuget.config 配置如下:

<预><代码><配置><配置><add key="repositoryPath" value="..\..\lib\packages"/></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?

解决方案

Make sure your nuget.config is configured like this:

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

这篇关于如何让 Visual Studio 2015 RC 从我的 nuget.config 中获取 repositoryPath 设置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆