实体框架迁移NuGet错误

13

使用Visual Studio 2013 Express预览版进行Web和Entity Framework 5,并尝试启用迁移时,出现以下错误:

PM> Enable-Migrations System.IO.FileNotFoundException:无法加载文件或程序集'Microsoft.VisualStudio.Shell, Version = 10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'或其一个依赖项。系统找不到指定的文件。文件名: 'Microsoft.VisualStudio.Shell, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' 在 System.Data.Entity.Migrations.Extensions.ProjectExtensions.GetProjectTypes(Project project) 在 System.Data.Entity.Migrations.Extensions.ProjectExtensions.IsWebSiteProject(Project project) 在 System.Data.Entity.Migrations.Extensions.ProjectExtensions.GetTargetDir(Project project) 在 System.Data.Entity.Migrations.MigrationsDomainCommand.GetFacade(String configurationTypeName) 在 System.Data.Entity.Migrations.EnableMigrationsCommand.FindContextToEnable(String contextTypeName) 在 System.Data.Entity.Migrations.EnableMigrationsCommand.<>c_DisplayClass2.<.ctor>b_0() 在 System.Data.Entity.Migrations.MigrationsDomainCommand.Execute(Action command)

无法加载文件或程序集'Microsoft.VisualStudio.Shell, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'或其一个依赖项。系统找不到指定的文件。 PM>

有任何建议吗?


你尝试过上周发布的RC版本吗?你可以从这里获取RC版本:http://www.microsoft.com/visualstudio/eng/2013-downloads - Pawel
我创建了一个工作项来验证这个问题 - https://entityframework.codeplex.com/workitem/1658 但很可能已经在RC中修复。请参见https://entityframework.codeplex.com/workitem/467获取更多详细信息。 - Pawel
3个回答

14

5

我之前尝试了提到的Redistributable Package,但它并没有解决错误。通过NuGet软件包管理器更新Entity Framework就为我解决了问题。


这对我也起作用了。我还尝试安装隔离的 shell 包,但无济于事。 - Francisc0

1

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接