iTranslated by AI

The content below is an AI-generated translation. This is an experimental feature, and may contain errors. View original article
💡

How to Fix NuGet Package Manager Console Errors in Visual Studio

に公開

The Visual Studio Package Manager Console broke without me doing anything. (I don't recall performing any suspicious operations.)

The following error appeared:

File C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2019\PROFESSIONAL\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\NUGET\Modules\NuGet\NuGet.Types.ps1xml could not be loaded because the operation was blocked by a software restriction policy (such as a policy created via Group Policy). The file was skipped due to the following validation exception: ...
The following error occurred while loading: ...

I found information suggesting this happens because the Microsoft certificate is registered as an untrusted publisher.

https://hatenablog-parts.com/embed?url=https%3A%2F%2Fgithub.com%2FNuGet%2FHome%2Fissues%2F7158

So, I will delete it from the Internet Options in IE.

Note that this should be done from Internet Options, not from "certlm.msc".

Discussion