我想知道在Visual Studio 2017项目中NuGet.Config文件在哪里?我试图在项目的根目录中创建我自己的NuGet.Config文件,但是我没有找到任何新的存储库(NuGet源代码)。有人知道吗?
以下是我试图为我的.Net核心项目实现的文件:
<?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>
发布于 2017-03-12 03:47:07
Visual Studio从解决方案根目录读取NuGet.Config文件。尝试将其移动到那里,而不是将其放在与项目相同的文件夹中。
您也可以将该文件放在%appdata%\NuGet\NuGet.Config
中,它将在任何地方使用。
https://docs.microsoft.com/en-us/nuget/schema/nuget-config-file
发布于 2018-07-17 20:33:02
有多个nuget包按以下顺序读取:
NuGetDefaults.Config file
。你可以在计算机级文件中找到。%ProgramFiles(x86)%\NuGet\Config
.nuget.config
的%APPDATA%\NuGet\nuget.config
.时在-configfile选项中指定的配置文件
你可以在here上找到更多信息。
发布于 2017-12-21 04:21:54
除了公认的答案之外,我想补充一条信息,Visual Studio2017中的NuGet包位于项目文件本身中。也就是说,右击项目->编辑,找到所有包引用条目。
https://stackoverflow.com/questions/42736107
复制相似问题