尝试启动新的 Web 项目时出现包安装错误

Package Installation Error while trying to start a new web project

我只是想开始一个新的 Web API 项目。我选择了个人用户帐户,然后按了创建。

错误消息说:

Package Installation Error

The preinstalled packages have a reference to missing Registry value. Could not find a Registry key name 'WebFormsVS16' under 'Software\NuGet\Repository

我尝试通过手动设置路径来创建丢失的注册表。然后变得更糟。我收到大量错误消息

Package Installation Error

Could not add all required packages to the project. The following packages failed to install from (the path)

它列出了整个消息列表,例如

bootstrap. 3.4.1: Unable to find version 3.4.1 of package bootstrap

Newtonsoft.Jason.12.0.2: Unable to find version 12.0.2

它继续和其他“无法找到版本..”错误消息。

我检查了我同事的注册表,他甚至没有 Software\NuGet 注册表。

可能值得尝试修复 Visual Studio 安装。这是我在删除 google/stack 溢出后尝试的第一件事。