Azure的:无法加载文件或程序'Microsoft.ServiceBus [英] Azure: Could not load file or assembly 'Microsoft.ServiceBus

查看:182
本文介绍了Azure的:无法加载文件或程序'Microsoft.ServiceBus的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有我想要测试的应用程序结构服务。 (http://xxx.cloudapp.net:8081/service.svc)。结果
我创建了一个控制台应用程序,并增加了服务参考服务,并得到了以下错误:

I have a app fabric service that I want to test. (http://xxx.cloudapp.net:8081/service.svc).
I created a console app and added a service reference to the service and got the following error:

无法加载文件或程序
  Microsoft.ServiceBus,
  版本= 1.0.0.0,文化=中立,
  公钥= 31bf3856ad364e35'或
  它的一个依赖。系统
  无法找到指定的文件。

Could not load file or assembly 'Microsoft.ServiceBus, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.

我是从下加入Microsoft.ServiceBus参考:\\ Program Files文件(x86)的\\ Windows Azure平台AppFabric的SDK \\ V1.0 \\组件\\ NET4.0

I added a reference to Microsoft.ServiceBus from C:\Program Files (x86)\Windows Azure platform AppFabric SDK\V1.0\Assemblies\NET4.0

我将在我的项目复制本地=真正的所有组件,如下建议:
<一href=\"http://msdn.microsoft.com/en-us/library/ee706702.aspx\">http://msdn.microsoft.com/en-us/library/ee706702.aspx

I set all assemblies in my project to Copy Local = True, as suggested here: http://msdn.microsoft.com/en-us/library/ee706702.aspx

额外的尽职调查:
我在红门的反射开Microsoft.ServiceBus,并确认它是正确的版本。只是踢,我也加入到反射器中引用的每个程序集引用,并设置所有引用复制本地=真。

Additional Due diligence: I opened Microsoft.ServiceBus in red-gate's reflector and confirmed that it is the correct version. Just for kicks, I also added references to each assembly referenced in reflector and set all references to copy local = true.

任何其他的想法?

...彼得

推荐答案

当您引用Microsoft.ServiceBus.dll,从安装位置引用它,例如,

When you reference Microsoft.ServiceBus.dll, reference it from the install location, e.g.,

C:\\ Program Files文件(x86)的\\ Windows Azure的
  平台AppFabric的结果
  SDK \\ V1.0 \\组件\\ NET4.0 \\ Microsoft.ServiceBus.dll

C:\Program Files (x86)\Windows Azure platform AppFabric
SDK\V1.0\Assemblies\NET4.0\Microsoft.ServiceBus.dll

...不是从GAC,并设置复制本地为true。

... not from the GAC, and set Copy Local to true.

您需要做的这一切要部署到Azure的;在Microsoft.ServiceBus.dll需要与你的项目打包的,因为它不是默认情况下可用在Azure上。

You need to do this in whatever you are deploying into Azure; the Microsoft.ServiceBus.dll needs to packaged with your project because it is not available by default in Azure.

如果你火了小提琴手,你会看到一个500错误调用该服务时。这证明,例外是不是在你的调用应用程序。

If you fire up Fiddler, you see a 500 error when calling the service. This proves that the exception isn't in your calling application.

这篇关于Azure的:无法加载文件或程序'Microsoft.ServiceBus的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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