Entity Framework Core - Return "'Could not load 'System.Runtime'" error as a result of database scaffolding

-1

Package manager console returns an error

"System.IO.FileLoadException: Could not load file or assembly 'System.Runtime, Version=4.2.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)" as a result of scaffold generating.

Scaffolding error

I'm using .NET Core 3.1.

asp.net-core
.net-core
entity-framework-core
asp.net-core-3.1
asked on Stack Overflow Oct 20, 2020 by maximsan • edited Oct 21, 2020 by Peter Csala

1 Answer

0

You should Change your startup project in Solution Explorer to your main project not a class library.

answered on Stack Overflow Oct 20, 2020 by Armin Shoeibi

User contributions licensed under CC BY-SA 3.0