[英]NuGet.Config file is not read for VS2015?
As far I've been able to figure out taking a look on docs.nuget.org , in order to be able to set my custom nuget repositories I need to set a NuGet.Config
in whichever of these places: 到目前为止,我能够弄清楚docs.nuget.org ,以便能够设置我的自定义nuget存储库,我需要在以下
NuGet.Config
设置NuGet.Config
:
%APPDATA%\\NuGet\\Nuget.config
So, I've created a NuGet.Config
file with this content in my Project folder: 因此,我在Project文件夹中创建了具有以下内容的
NuGet.Config
文件:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageRestore>
<add key="enabled" value="True" />
<add key="automatic" value="True" />
</packageRestore>
<activePackageSource>
<add key="Living" value="C:\NugetRepository" />
</activePackageSource>
</configuration>
However, when I look at NuGet package sources list, my Living
source doesn't appear. 但是,当我查看NuGet软件包来源列表时,我的
Living
来源没有出现。
Any ideas? 有任何想法吗?
The NuGet package sources list in Visual Studio is read the config from Global NuGet.config under %APPDATA%\\NuGet\\Nuget.config. Visual Studio中的NuGet包源列表是从%APPDATA%\\ NuGet \\ Nuget.config下的Global NuGet.config中读取的配置。 So if you want your Living source list in the NuGet Package Source list, please add your Package Source config in Global NuGet.config as below.
因此,如果要在“ NuGet软件包来源”列表中找到“生活来源”列表,请如下所示在“全局NuGet.config”中添加“软件包来源”配置。 Then please restart your Visual Studio.
然后,请重新启动 Visual Studio。
<configuration>
<packageSources>
<add key="Living" value="C:\NugetRepository" />
</packageSources>
<packageRestore>
<add key="enabled" value="True" />
<add key="automatic" value="True" />
</packageRestore>
<activePackageSource>
<add key="Living" value="C:\NugetRepository" />
</activePackageSource>
</configuration>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.