修改Nuget包的默认保存路径

1、打开路径:C:\Program Files (x86)\NuGet\Config

2、在此路径下新建Nuget.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>
  <config>
     <add key="globalPackagesFolder" value="F:\Temp\Nuget\.nuget\packages" />
  </config>
</configuration>

3、在Microsoft.VisualStudio.Offline.config文件的基础上添加下面的节点,设置value值

<config> 
    <add key="globalPackagesFolder" value="D:\nuget\packages" />
</config>

 

posted @ 2023-03-03 10:04  白草红叶黄花  阅读(234)  评论(0编辑  收藏  举报