c# - Service Fabric 无法加载程序集 c#

标签 c# azure-service-fabric badimageformatexception

“无法加载文件或程序集‘Microsoft.ServiceFabric.Data’或其依赖项之一。尝试加载格式不正确的程序。”

异常详细信息:System.BadImageFormatException:无法加载文件或程序集“Microsoft.ServiceFabric.Data”或其依赖项之一。试图加载格式不正确的程序。

我将 Service Fabric 的 nuget 添加到我的 web api 中,这是异常(exception)情况。 我尝试编译 x64/AnyCPU/x86

有什么帮助吗?

最佳答案

这个问题的答案为我解决了这个问题

I get a "An attempt was made to load a program with an incorrect format" error on a SQL Server replication project

We recently had the issue when trying to run the code from Visual Studio. In that case you need to do TOOLS > OPTIONS > Projects and Solutions > WEB PROJECTS and check the "Use the 64 bit version of IIS Express for web sites and projects".

关于c# - Service Fabric 无法加载程序集 c#,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36890784/

相关文章:

.net - 动态更改 Service Fabric 环境变量

azure-service-fabric - Service Fabric 多个通信监听器

c# - hnetcfg.dll 抛出 BadImageFormatException

.net - Bad Image Format 异常问题

asp.net - .NET 程序集格式有大小限制吗?

c# - Windows Phone 8.1文本框字符virtualKey验证

c# - AutoResetEvent.WaitOne 超时与 Thread.Sleep

c# - 修改 Service Fabric 可靠集合中的原始对象

c# - 使用字符串格式进行速度优化

c# - MVVM Execute 方法每 x 秒/分钟,窗口倒计时