一、修改下载的NuGet包存储位置:
1、文件路径:
C:\Users\{登录用户名}\AppData\Roaming\NuGet2、打开修改 “NuGet.Config”,文件内容
xml version="1.0" encoding="utf-8"?修改后的内容为:
<configuration>
<packageSources>
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
packageSources>
configuration>
<?xml version="1.0" encoding="utf-8"?>二、修改VS离线包引用地址:
<configuration>
<packageSources>
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
</packageSources>
<config>
<add key="globalPackagesFolder" value="D:\NuGet\packages" />
<add key="repositoryPath" value="D:\NuGet\packages" />
</config>
</configuration>
C:\Program Files (x86)\NuGet\Config2、打开修改 “Microsoft.VisualStudio.Offline.config”,文件内容
xml version="1.0" encoding="utf-8"?修改后的文件内容:
<configuration>
<packageSources>
<add key="Microsoft Visual Studio Offline Packages" value="C:\Program Files (x86)\Microsoft SDKs\NuGetPackages\"/>
</packageSources>
configuration>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="Microsoft Visual Studio Offline Packages" value="D:\NuGet\packages\"/>
</packageSources>
<config>
<add key="globalPackagesFolder" value="F:\NuGet\packages\" />
</config>
</configuration>
- 本文标题: vs 如何指定nuget下载路径
- 文章分类:【.NET/Web】
- 非特殊说明,本文版权归【胡同里的砖头】个人博客 所有,转载请注明出处.