c#-无法创建主要的NuGet缓存,dotnet恢复.
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了c#-无法创建主要的NuGet缓存,dotnet恢复.,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含2536字,纯文字阅读大概需要4分钟。
内容图文
我正在VS 2017中编写应用程序.Net Core.
使用dotnet restore命令时,我收到一条消息
Configuring...
-------------------
A command is running to initially populate your local package cache, to improve restore speed and enable offline access. This command will take up to a minute to complete and will only happen once.
Decompressing 100% 4774 ms
Expanding 100% 12241 ms
Failed to create prime the NuGet cache. restore failed with: 1
Restoring packages for D:\01_Toci\100_GIT\Passenger\Passenger.Api\Passenger.Api.csproj...
Restoring packages for D:\01_Toci\100_GIT\Passenger\Passenger.Infrastructure\Passenger.Infrastructure.csproj...
Restoring packages for D:\01_Toci\100_GIT\Passenger\Passenger.Core\Passenger.Core.csproj...
Lock file has not changed. Skipping lock file write. Path: D:\01_Toci\100_GIT\Passenger\Passenger.Infrastructure\obj\project.assets.json
Lock file has not changed. Skipping lock file write. Path: D:\01_Toci\100_GIT\Passenger\Passenger.Core\obj\project.assets.json
Restore completed in 337,41 ms for D:\01_Toci\100_GIT\Passenger\Passenger.Core\Passenger.Core.csproj.
Restore completed in 337,39 ms for D:\01_Toci\100_GIT\Passenger\Passenger.Infrastructure\Passenger.Infrastructure.csproj.
Lock file has not changed. Skipping lock file write. Path: D:\01_Toci\100_GIT\Passenger\Passenger.Api\obj\project.assets.json
Restore completed in 1,34 sec for D:\01_Toci\100_GIT\Passenger\Passenger.Api\Passenger.Api.csproj.
NuGet Config files used:
C:\Users\wojse\AppData\Roaming\NuGet\NuGet.Config
C:\Program Files (x86)\NuGet\Config\Microsoft.VisualStudio.Offline.config
Feeds used:
https://api.nuget.org/v3/index.json
C:\Program Files (x86)\Microsoft SDKs\NuGetPackages
dotnet –info输出:
D:\01_Toci\100_GIT\Passenger\Passenger.Api>dotnet --info
.NET Command Line Tools (1.0.4)
Product Information:
Version: 1.0.4
Commit SHA-1 hash: af1e6684fd
Runtime Environment:
OS Name: Windows
OS Version: 10.0.15063
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\1.0.4
Microsoft .NET Core Shared Framework Host
Version : 2.0.3
Build : a9190d4a75f4a982ae4b4fa8d1a24526566c69df
我尝试了很多事情,但没有任何帮助:
>我安装了.net core 2.0
>我将varsion包更改为:.csproj中的1.0.4
>我在所有dotnet恢复之后都使用了dotnet nuget locals -c命令
有人能帮我吗? :) 请
解决方法:
升级到VS 15.6后,我遇到了这个问题.通过暂时将所有低于1.0.4的SDK移出SDK文件夹(C:/ Program Files / dotnet / sdk),可以解决此问题.运行dotnet restore,缓存填充成功,然后将SDK移回.
从长远来看,我们将寻求更新global.json文件以固定一个更新的SDK,如先前的响应所示.
内容总结
以上是互联网集市为您收集整理的c#-无法创建主要的NuGet缓存,dotnet恢复.全部内容,希望文章能够帮你解决c#-无法创建主要的NuGet缓存,dotnet恢复.所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。