相关疑难解决方法(0)

x64 Project中的enable-migrations获取System.BadImageFormatException

我有一个项目设置为x64(它使用一些64位的Nuget包).一切都运行和部署良好,但尝试enable-migrations在包管理器控制台运行EF's 得到我System.BadImageFormatException.完整的例外情况:

PM> enable-migrations
System.BadImageFormatException: Could not load file or assembly  or one of its dependencies. An attempt was made to load a program with an incorrect format.
File name: 
   at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& …
Run Code Online (Sandbox Code Playgroud)

64-bit entity-framework ef-migrations

24
推荐指数
2
解决办法
6328
查看次数

标签 统计

64-bit ×1

ef-migrations ×1

entity-framework ×1