删除了我本地软件包缓存中的所有Nuget软件包,现在我根本无法使用VS [英] Deleted all the Nuget packages in my local package cache, now I can't use VS at all

查看:261
本文介绍了删除了我本地软件包缓存中的所有Nuget软件包,现在我根本无法使用VS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我删除了 C:\Users\myself\.nuget\packages 中的所有文件和文件夹,现在删除了所有。 NET Core 项目抱怨说 System Void 或其他任何原始类型都找不到。尝试了以下操作

I deleted all the files and folders inside C:\Users\myself\.nuget\packages and now all my .NET Core projects complain that System or Void or anything primitive can't be found. Tried the following


  • Nuget.exe-恢复c:\path\to\myslnfile.sln -PackageDirectory C:\Users \myself\.nuget\packages

  • 构建解决方案

  • 创建一个新项目(新项目抱怨同样的事情)

我现在该怎么办?

推荐答案

尝试以下操作:


  1. 关闭Visual Studio。

  2. 运行 dotnet恢复您的解决方案的CMD命令。

  3. 重新打开Visual Studio。

  1. Close Visual Studio.
  2. Run dotnet restore CMD command for your solution.
  3. Re-open Visual Studio.

这篇关于删除了我本地软件包缓存中的所有Nuget软件包,现在我根本无法使用VS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆