13
votes

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?

3
Have you tried RC that shipped last week? You can get the RC from here: microsoft.com/visualstudio/eng/2013-downloads - Pawel
I created a work item to verify this - entityframework.codeplex.com/workitem/1658 but it is most likely fixed in RC. See entityframework.codeplex.com/workitem/467 for more details. - Pawel

3 Answers

14
votes

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).

5
votes

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.

1
votes

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.