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

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

问题描述

我删除了 C:Usersmyself.nugetpackages 中的所有文件和文件夹,现在我所有的 .NET Core 项目都抱怨 SystemVoid 或任何原语都找不到.尝试了以下

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

  • Nuget.exe -restore c:path omyslnfile.sln -PackagesDirectory C:Usersmyself.nugetpackages
  • 构建解决方案
  • 创建一个新项目(新项目抱怨同样的事情)

我现在该怎么办?

推荐答案

试试这个:

  1. 关闭 Visual Studio.
  2. 为您的解决方案运行 dotnet restore CMD 命令.
  3. 重新打开 Visual Studio.

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

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