我想知道Visual Studio 2017项目中的NuGet.Config文件在哪里?我试图在项目的根目录中创建自己的NuGet.Config文件,但没有找到任何新的存储库(NuGet源)。有人有什么主意吗?
这是我要为.Net Core项目获取的文件:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="AspNetCore" value="https://dotnet.myget.org/F/aspnetcore-ci-dev/api/v3/index.json" />
<add key="AspNetCoreTools" value="https://dotnet.myget.org/F/aspnetcore-tools/api/v3/index.json" />
<add key="NuGet" value="https://api.nuget.org/v3/index.json" />
</packageSources>
</configuration>
Visual Studio从解决方案根目录读取NuGet.Config文件。尝试将其移到那里,而不是将其放置在与项目相同的文件夹中。
您也可以将文件放在%appdata%\NuGet\NuGet.Config
,它将在任何地方使用。
https://docs.microsoft.com/zh-cn/nuget/schema/nuget-config-file
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句