Error loading type library/DLL (any Nuget package)

0

I'm trying to add packages within a .NET Core Class Library project, but after I run the following command

Install-Package <package-name>

I get the following error:

Install-Package : Error loading type library/DLL. (Exception from HRESULT: 0x80029C4A (TYPE_E_CANTLOADLIBRARY))
At line:1 char:1
+ Install-Package Microsoft.EntityFrameworkCore
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Install-Package], Exception
    + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand

In addition to Class Library projects, I've tried adding packages to VB.NET class library projects that use .NET Framework and ASP.NET projects, both using .NET Core and .NET Framework and all cases threw the same results. Of course, I got the same error message either using the console or the Nuget graphical manager.

I tried removing the "Nuget" individual component and re-installing it, but unfortunately, the results remained equal.

What could be possibly going on? Maybe is it something related to Windows or the operating system?

.net
windows
.net-core
nuget
visual-studio-2019
asked on Stack Overflow Apr 12, 2020 by aibars

1 Answer

0

Doing a complete clean and reinstall of all the VS components on my Windows fixed the issue. However, I couldn't find the root cause of this.

answered on Stack Overflow Apr 12, 2020 by aibars

User contributions licensed under CC BY-SA 3.0