Error adding migrations: Failed to create CoreCLR, HRESULT: 0x80070057

SoggyBottomBoy 6 Reputation points
2021-01-16T04:14:20.537+00:00

I'm having an issue whereby I get the error message: Failed to create CoreCLR, HRESULT: 0x80070057 when I use any of the entity framework tooling.

I have 2 projects in my solution an ASP.NET Core (.NET 5) Web API and a .NET Standard 2.0 Class Library.

My intention is that my class library would contain the Models so that I can re-use these same models client side (and in a VSTO app which is .NET Framework 4.7.2). I'm stuck with .NET standard for the moment and can't move to .NET 5

It appears that the root cause of the issue is adding a project reference to the class library. Even with my models being stored in my ASP.NET project and me not referencing the class library with a using statement just having it as a reference results in the error. As soon as I remove the reference to my class library I have no problems... is there something I am missing?

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
696 questions
ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,188 questions
{count} vote