gpt4 book ai didi

azure - 使用 Service Fabric 模板时出现错误的 dll 文件异常

转载 作者:行者123 更新时间:2023-12-04 22:44:01 24 4
gpt4 key购买 nike

客户端中的 Microsoft.ServiceFabric.Actors.dll 文件存在问题。当我们使用Service Fabric模板创建项目时,dll文件存在于Service中,但不存在于客户端中,然后我们尝试从客户端项目中引用该dll文件,当我们运行客户端时,我们得到:

An unhandled exception of type 'System.BadImageFormatException' occurred in mscorlib.dll Additional information: Could not load file or assembly 'Microsoft.ServiceFabric.Actors, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. An attempt was made to load a program with an incorrect format.

有人对 dll 文件有同样的问题吗?如果有,我们应该如何修复它?

最佳答案

在 Service Fabric 应用程序之外使用客户端时,我收到了相同的错误。确保您的客户端项目是为 x64 平台构建的。

请按照下列步骤操作:
1. 右键单击​​您的客户项目并转到“属性”。
2. 在“构建”选项卡上,将“平台目标”设置为 x64。
3. 构建您的项目并使用客户端。

关于azure - 使用 Service Fabric 模板时出现错误的 dll 文件异常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35656598/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com