EntityFramework 6.4 - add-migration broken

entity-framework-6

Question

Using Visual Studio 2019 16.5.3, Microsoft .NET Framework 4.803752. Build target is .Net Framework 4.6.1. I did NuGet install of EntityFramework 6.4, also have Roslyn. Not using .NET EntityFramework Core (not sure that's the correct name -- something Core).

When I do add-migration, I get error:

System.TypeLoadException: Could not load type 'System.Data.Entity.Infrastructure.Design.Executor+Scaffold' from assembly 'EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.

I wonder why EntityFramework version shows 6.0.0.0 rather than 6.4 -- is that a problem?

This all started during an effort to get TypeScript working in my project, which seemed to be OK until I tried add-migration.

I'll try stepping backwards from EntityFramework 6.4.

Any other ideas?

1
0
4/11/2020 2:42:58 PM

Accepted Answer

I had this error when using EntityFramework 6.3.0, downgrading it to 6.2.0 fix my issue.

11
9/27/2019 4:10:15 PM

Popular Answer

There is a workaround for this bug. Just edit a file and restart Visual Studio. It works!



Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow