Reputation:
Using Visual Studio 2013 Express Preview for Web and Entity Framework 5
I'm getting the following error when I attempt to enable migrations:
PM> Enable-Migrations System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.Shell, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. File name: 'Microsoft.VisualStudio.Shell, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' at System.Data.Entity.Migrations.Extensions.ProjectExtensions.GetProjectTypes(Project project) at System.Data.Entity.Migrations.Extensions.ProjectExtensions.IsWebSiteProject(Project project) at System.Data.Entity.Migrations.Extensions.ProjectExtensions.GetTargetDir(Project project) at System.Data.Entity.Migrations.MigrationsDomainCommand.GetFacade(String configurationTypeName) at System.Data.Entity.Migrations.EnableMigrationsCommand.FindContextToEnable(String contextTypeName) at System.Data.Entity.Migrations.EnableMigrationsCommand.<>c_DisplayClass2.<.ctor>b_0() at System.Data.Entity.Migrations.MigrationsDomainCommand.Execute(Action command)
Could not load file or assembly 'Microsoft.VisualStudio.Shell, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. PM>
Any suggestions?
Upvotes: 14
Views: 9216
Reputation: 73
I tried the Redistributable Package mentioned earlier and it did not fix the error. Simply updating the Entity Framework through the NuGet Package Manager did the trick for me.
Upvotes: 5
Reputation: 646
The issue is also explained here: https://connect.microsoft.com/VisualStudio/feedback/details/805933/filenotfoundexception-enabling-ef-migration
It says it is fixed with vs2013 update 2. But I just tested it with windows 8.1 and update 2 but could still reproduce this.
Upvotes: 1
Reputation: 376
I had the same exact issue and finally solved it by installing "Microsoft Visual Studio 2012 Shell Redistributable Package (isolated)" (http://www.microsoft.com/en-us/download/details.aspx?id=30670).
Upvotes: 14