简体   繁体   中英

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?

在此处输入图像描述

This has happened before and I solved it by reinstalling the Nuget Package Manager using a command. 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.

Found this article: https://forums.asp.net/t/1776324.aspx?How+to+install+upgrade+VS+NuGet+Package+Manager+ but It's not applicable here.

NuGet Package Manager is preinstalled in VS2019 and no separate package to download and install. Also, there's not Extension Manage in VS2019 like older versions.

Please Let me know the command to reinstall NuGet Package Manager in Visual Studio 2019.

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM