Here is what I did before I got this error:
I believe I could figure out a solution. I had several projects in my solution.
My database logic was in SqlDataAccess. The assembly was reference in WebUI.
I started off at the DomainLogic. Define POCOs for repository base classes there.
Then I added SqlDataAccess project.
and tried Enable-Migrations, Add-Migration
and Update-Database
command. It ran fine. After I added WebUI (an MVC 4 based web application to the project and ran the commands above. I started getting this version error.
I unload the project WebUI
and re ran the command. And it ran fine again. So, Even if it's not the best solution you might want to unload other projects leaving the atabase project in the solution and then running these commands. It worked for me. All the best!