装配 EntityFramework 的 System.Data.Entity.Properties.Resources.Migrate.resources 上的 MissingManifestResourceException

mar*_*net 2 c# database entity-framework

我不太确定这是一个问题,而是一个声明。在我最终找到解决方案之前,我与这个错误斗争了很长时间。

我们已将实体框架从 6.2.0 更新到 6.4.0。我们的构建过程运行良好,但我们的版本在迁移阶段被阻塞了。记录的错误是:

Unhandled Exception: System.Resources.MissingManifestResourceException: 
    Could not find any resources appropriate for the specified culture or the neutral culture.  
    Make sure "System.Data.Entity.Properties.Resources.Migrate.resources" was correctly embedded or linked into assembly "EntityFramework" at compile time, or that all the satellite assemblies required are loadable and fully signed.
Run Code Online (Sandbox Code Playgroud)

我到处搜索,发现涉及未嵌入 resx 文件的内容等......我尝试过的一切都没有奏效。

我终于发现,随着 Entity Framework 6.3.0 的更新,不再使用 MIGRATE.EXE 命令。它被替换为 EF6.EXE。这个新的命令行实用程序的命令行参数集略有不同,但是一旦我们更新了发布流程,事情就开始按预期运行。

我希望这对其他人有帮助。

mar*_*net 6

我终于发现,随着 Entity Framework 6.3.0 的更新,不再使用 MIGRATE.EXE 命令。它被替换为 EF6.EXE。这个新的命令行实用程序的命令行参数集略有不同,但是一旦我们更新了发布流程,事情就开始按预期运行。

TL; 博士

不要使用 migrate.exe.... 使用 ef6.exe

我希望这对其他人有帮助。