“无法加载文件或程序集‘Microsoft.ServiceFabric.Data’或其依赖项之一。尝试加载格式不正确的程序。”
异常详细信息:System.BadImageFormatException:无法加载文件或程序集“Microsoft.ServiceFabric.Data”或其依赖项之一。试图加载格式不正确的程序。
我将 Service Fabric 的 nuget 添加到我的 web api 中,这是异常(exception)情况。 我尝试编译 x64/AnyCPU/x86
有什么帮助吗?
最佳答案
这个问题的答案为我解决了这个问题
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/