使用本服务的面料模板时错误的DLL文件例外 [英] Bad dll file exception when using the Service Fabric template

查看:136
本文介绍了使用本服务的面料模板时错误的DLL文件例外的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正与客户端Microsoft.ServiceFabric.Actors.dll文件的问题。
当我们创建使用服务模板布项目,dll文件存在于服务,而不是在客户端,那么,我们试图从客户端项目中引用的DLL文件,当我们运行客户端,我们得到了:

We are having an issue with Microsoft.ServiceFabric.Actors.dll file in client. When we created the project using the Service Fabric template, the dll file exists in Service, but not in client, then we tried to reference that dll file from the client project, when we run the client, we got:

类型的未处理的异常System.BadImageFormatException
  发生在mscorlib.dll
  其他信息:无法加载文件
  或组装'Microsoft.ServiceFabric.Actors,版本= 4.0.0.0,
  文化=中性公钥= 31bf3856ad364e35'或一个其
  依赖。一个试图加载程序使用不正确的
  格式。

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文件相同的问题,如果是这样,我们应该如何解决这个问题?

Has anyone had the same issue with dll file, and if so, how should we fix it?

推荐答案

使用本服务的光纤应用之外的客户端时,我收到了同样的错误。确保您的客户端项目是针对x64平台构建。



请按照下列步骤:

1.右键单击您的客户端项目,并转到属性。

2.在构建选项卡,设置你的'平台的目标'到x64。

3.生成项目,并使用客户端。

I received the same error when using a client outside of the Service Fabric Application. Make sure your client project is built for the x64 platform.

Follow these steps:
1. Right click on your client project and go to 'Properties'.
2. On the 'Build' tab, set your 'Platform target' to x64.
3. Build your project and use the client.

这篇关于使用本服务的面料模板时错误的DLL文件例外的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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