I just installed VS 11 and created a class library project. Then I added entity framework 5 beta. Then I created a simple user class and dbcontext class. Then I used the console command, "Enable-Migrations -EnableAutomaticMigrations" which worked just fine and added the appropriate migrations directory and configuration file. The problem is when I run "Add-Migrtion InitialMigration", I get the following error.
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.IO.FileNotFoundException: Could not load file or assembly 'System.Data.Entity, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The system cannot find the file specified. ---> System.IO.FileNotFoundException: Could not load file or assembly 'System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The system cannot find the file specified.
I had EF 4.2 installed previously, but I uninstalled it. In fact after I first tried this and it failed, I have uninstalled VS, SQL and anything related. Then I rebooted and simple installed visual studio 11 and tried again, but still get the same error. I am suspect this is related to the previous entity framework install, but I don't know how to get it straightened out.
I am running on Win 7 I have tried the gacutil as described here Can anyone spot why I keep getting this error testing the EF 5 beta, but it didn't find anything to remove I guess.