enable-migrations error : project failed to build

asp.net-mvc entity-framework

Question

Using ASP.NET MVC4 with EF4.3

Running Enable-Migrations from PM Console

System.Management.Automation.RuntimeException: The project 'MyProj' failed to build. The project 'MyProj' failed to build.

The project builds (control-shift-B)

Is there any way to get more detail on this error to diagnose?

1
8
12/1/2016 12:07:47 AM

Accepted Answer

Turns out I had run this earlier, on a project where there was no dbContext. This created a migrations Configuration class that said "fill in the name of the class", which was failing to build.

This was causing one of my projects to silently fail to compile.

Removing the Configuration class solved my problem.

2
8/11/2012 11:35:33 PM

Popular Answer

This can also happen if you are building a 64-bit application. Switch to "Any CPU", at least temporarily while building the migrations, and the problem may go away. This is just one thing that can cause that error, though.



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