缓存清理与全局缓存路径修改
- 下载 nuget.exe,将 nuget.exe 所在路径添加到 PATH 环境变量;
- 查看缓存文件路径
nuget locals all -list
- 清理缓存
# 清除 http-cache
nuget locals http-cache -clear
# 清除包缓存
nuget locals packages-cache -clear
# 清除全局缓存
nuget locals global-packages -clear
# 清除 temp
nuget locals temp -clear
# 清楚插件缓存
nuget locals plugins-cache -clear
# 清除所有缓存
nuget locals all -clear
- 修改全局缓存路径
打开 C:\Users\ChenQian\AppData\Roaming\NuGet\NuGet.Config
文件,在 configuration
节点下添加
<config>
<add key="globalPackagesFolder" value="G:\Users\ChenQian\.nuget\packages" />
</config>