服务结构System.BadImageFormatException [英] Service Fabric System.BadImageFormatException

查看:79
本文介绍了服务结构System.BadImageFormatException的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我下载了Service Fabric SDK 2.4.164的最新版本,并尝试创建一个新的简单无状态服务。构建成功,但是当我运行它进行调试时,我得到了:

I downloaded the latest version of Service Fabric SDK 2.4.164 and try to create a new simple stateless service. Build succeeded but when I run it to debug I got:


类型为'System.BadImageFormatException'的未处理异常
发生在未知模块。

An unhandled exception of type 'System.BadImageFormatException' occurred in Unknown Module.

其他信息:无法加载文件或程序集
'System.Fabric,版本= 5.0.0.0,区域性=中性,
PublicKeyToken = 31bf3856ad364e35'或其依赖项之一。尝试
加载格式不正确的程序。

Additional information: Could not load file or assembly 'System.Fabric, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. An attempt was made to load a program with an incorrect format.

出了什么问题?请帮助解决。让我知道是否需要添加更多信息

What is the problem? Please help to solve that. Let me know if I have to add more informations

推荐答案

Azure Service Fabri仅支持x64平台。看来您正在使用某些x86工具。如果您已安装

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

这篇关于服务结构System.BadImageFormatException的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆