Service Fabric System.BadImageFormatException

人走茶凉 提交于 2019-11-30 20:33:49

Azure Service Fabri only supports x64 platform. It seems you're using some x86 tools. If you have installed dotnet (CLI) tools for x64 and x86 then check Path environment variable. The first one should be path to the x64 components, it helped me to solve the same issue

All Service Fabric assemblies are compiled to x64. Make sure your project is also targeting x64, and not AnyCPU.

The best way to do this is to go into Configuration Manager in Visual Studio, create x64 build configurations for each project, and then delete all of the AnyCPU build configurations. That's how the Service Fabric project templates in Visual Studio are set up. But if you create a project from a different template, like Console Application or Class Library, it will be created with an AnyCPU build configuration - you need to change that to x64 if you reference any Service Fabric assemblies.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!