Constructor on type 'System.Data.Entity.Migrations.Utilities.DomainDispatcher' not found.
See original GitHub issueHello,
after last upgrade to VS 2017 (15.8.0) I can not create migration in my project. Script throw exception in packages\EntityFramework.6.2.0\tools\EntityFramework.psm1:783
Exception message: "Constructor on type 'System.Data.Entity.Migrations.Utilities.DomainDispatcher' not
found."
CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : MissingMethodException
my command in Package manager Console is: EntityFramework\Add-Migration -StartUpProjectName "xxx" myMigrationName
Further technical details
EF version: 6.2 Database Provider: EntityFramework.SqlServer Operating system: Windows 10 (I upgrade to version 1803 one day before)
Thanks Pavel
Issue Analytics
- State:
- Created 5 years ago
- Comments:25 (8 by maintainers)
Top Results From Across the Web
Exception when trying to migrate database in Entity ...
PM> update-database Exception calling "CreateInstance" with "7" argument(s): "Constructor on type 'System.Data.Entity.Migrations.Utilities.
Read more >How to fix the entity framework problem with System.Data ...
How to fix the entity framework problem with System.Data.Entity.Migrations.Utilities.DomainDispatcher not found. After much searching and repair ...
Read more >Entity Framework 6.2.0 scripting errors after upgrading to ...
Utilities.DomainDispatcher' not found." ... Exception calling "CreateInstance" with "7" argument(s): "Constructor on type 'System.Data.Entity.
Read more >Design-time DbContext Creation - EF Core
Using a constructor with no parameters. If the DbContext can't be obtained from the application service provider, the tools look for the derived ......
Read more >Aviacion_Civil_Web - packages - EntityFramework.6.2.0
'System.Data.Entity.Migrations.ProjectTypeNotSupportedException' ... The 'entityFramework'. 24. section is added if it does not exist.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
The problem at least on my machine is that version 3.0.0.0 of the System.Management.Automation assembly is loaded in the package management console, and EntityFramework.PowerShell.Utility.dll is build against version 1.0.0.0.
I have a temporary fix of adding the following binding redirect to “C:\Users\USERNAME\AppData\Local\Microsoft\VisualStudio\15.0_313c23f6\devenv.exe.config”
Note, the fix needs to be applied everytime you update VS.
I was able to figure this out as its the same issue as this one https://github.com/PowerShell/PowerShell/issues/6189
Which i was also having, but was fixed in a recent VS update. Hopefully the fix they applied is easy for you too!
It was reported in https://twitter.com/tore_aurstad/status/1115005326011641856?s=21 that this issue also repros on Visual Studio 2019.