[英]Reinstall Nuget Package Manager in Visual Studio 2019
I am facing a problem with my project.我的项目遇到问题。
The type or namespace name 'System' could not be found (are you missing a using directive or an assembly reference?
找不到类型或命名空间名称“System”(您是否缺少 using 指令或程序集引用?
This has happened before and I solved it by reinstalling the Nuget Package Manager using a command.这以前发生过,我通过使用命令重新安装 Nuget Package 管理器来解决它。 Unfortunately, I am not finding that command again.
不幸的是,我再也找不到那个命令了。 I tried to find the solution online but everything I am getting is installing/reinstalling NuGet packages and not package manager.
我试图在网上找到解决方案,但我得到的只是安装/重新安装 NuGet 包,而不是 package 管理器。
Found this article: https://forums.asp.net/t/1776324.aspx?How+to+install+upgrade+VS+NuGet+Package+Manager+ but It's not applicable here.找到这篇文章: https://forums.asp.net/t/1776324.aspx?How+to+install+upgrade+VS+NuGet+Package+Manager+但这里不适用。
NuGet Package Manager is preinstalled in VS2019 and no separate package to download and install. NuGet Package Manager 预装在 VS2019 中,没有单独的 package 下载和安装。 Also, there's not Extension Manage in VS2019 like older versions.
此外,VS2019 中没有像旧版本那样的扩展管理。
Please Let me know the command to reinstall NuGet Package Manager in Visual Studio 2019.请让我知道在 Visual Studio 2019 中重新安装 NuGet Package 管理器的命令。
Such nuget restore issues can normally fix by deleting the obj folder where the nuget files like project.assets.json
, projectname.csproj.nuget.g.targets
, projectname.csproj.nuget.g.props
, projectname.csproj.nuget.dgspec.json
and projectnamecsproj.nuget.cache
are stored. Such nuget restore issues can normally fix by deleting the obj folder where the nuget files like
project.assets.json
, projectname.csproj.nuget.g.targets
, projectname.csproj.nuget.g.props
, projectname.csproj.nuget.dgspec.json
和projectnamecsproj.nuget.cache
被存储。
If this still doesn't fix it, delete the hidden .vs
folder inside the solution, where Visual Studio stores the user settings for the project.如果这仍然不能解决问题,请删除解决方案中隐藏的
.vs
文件夹,Visual Studio 在其中存储项目的用户设置。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.