网站维护 静态页面,vue 实现网站开发,2022最新新闻素材摘抄,重庆网站建设网领科技参考网上大部分方法错误#xff0c;根本不起作用。正确方法是
C:\Users\你的用户名\AppData\Roaming\NuGet找到NuGet.Config打开#xff0c;看到类似下面信息#xff08;可能不一样#xff09;
?xml version1.0 encodingutf-8?
co…参考网上大部分方法错误根本不起作用。正确方法是
C:\Users\你的用户名\AppData\Roaming\NuGet找到NuGet.Config打开看到类似下面信息可能不一样
?xml version1.0 encodingutf-8?
configurationpackageRestoreadd keyenabled valueTrue /add keyautomatic valueTrue //packageRestorebindingRedirectsadd keyskip valueFalse //bindingRedirectspackageManagementadd keyformat value0 /add keydisabled valueFalse //packageManagementpackageSourcesadd keynuget-ch valuehttps://nuget.cdn.azure.cn/v3/index.json /add keyMicrosoft Visual Studio Offline Packages valueC:\Program Files (x86)\Microsoft SDKs\NuGetPackages\ //packageSourcesactivePackageSourceadd keynuget-ch valuehttps://nuget.cdn.azure.cn/v3/index.json //activePackageSource
/configuration
找到关键词 https://api.nuget.org/v3/index.json
在关键词上下行加disabledPackageSources包裹起来没有的话就把下面3行放对应位置 disabledPackageSourcesadd keynuget.org valuehttps://api.nuget.org/v3/index.json protocolVersion3 //disabledPackageSources
最后
?xml version1.0 encodingutf-8?
configurationpackageSourcesdisabledPackageSourcesadd keynuget.org valuehttps://api.nuget.org/v3/index.json protocolVersion3 //disabledPackageSourcesadd keyhuawei valuehttps://repo.huaweicloud.com/repository/nuget/v3/index.json /add keyMicrosoft Visual Studio Offline Packages valueC:\Program Files (x86)\Microsoft SDKs\NuGetPackages\ /add keyazure valuehttps://nuget.cdn.azure.cn/v3/index.json /add keytencent valuehttps://mirrors.cloud.tencent.com/nuget/ //packageSourcespackageRestoreadd keyenabled valueTrue /add keyautomatic valueTrue //packageRestorebindingRedirectsadd keyskip valueFalse //bindingRedirectspackageManagementadd keyformat value0 /add keydisabled valueFalse //packageManagement
/configuration 注意如果你项目里面有Nuget.config同样设置下
【附录】
添加资源
华为国内镜像 https://repo.huaweicloud.com/repository/nuget/v3/index.json
微软国内镜像 https://nuget.cdn.azure.cn/v3/index.json
腾讯镜像
https://mirrors.cloud.tencent.com/nuget/ Microsoft Visual Studio Offline Packages C:\Program Files (x86)\Microsoft SDKs\NuGetPackages\
国外nuget.org https://api.nuget.org/v3/index.json
【参考文献】
[1] https://stackoverflow.com/questions/61380157/doing-a-local-nuget-package-installation-but-getting-the-error-unable-to-get-r