gpt4 book ai didi

entity-framework - 使用 Visual Studio 2013 的 Entity Framework 迁移错误

转载 作者:行者123 更新时间:2023-12-04 06:19:33 25 4
gpt4 key购买 nike

更新到 Visual Studio 2013 后,我在运行 Entity Framework 迁移时遇到错误。

    PM> update-database
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.UpdateDatabaseCommand.<>c__DisplayClass2.<.ctor>b__0()
at System.Data.Entity.Migrations.MigrationsDomainCommand.Execute(Action command)

有人知道如何解决这个问题吗?

最佳答案

我能够使用 Microsoft Visual Studio 2012 Shell (Isolated) Redistributable Package 解决这个问题。安装包后,更新数据库正常工作。

PM> update-database
Specify the '-Verbose' flag to view the SQL statements being applied to the target database.
No pending code-based migrations.
Running Seed method.

关于entity-framework - 使用 Visual Studio 2013 的 Entity Framework 迁移错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19748878/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com