System.IO.FileNotFoundException:无法加载文件或程序集'Microsoft.ServiceBus,版本= 3.0.0.0 [英] System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.ServiceBus, Version=3.0.0.0
问题描述
我已经创建了一个控制台应用程序(.NET v4.5.2/4.6),以使用Entity Framework 6将消息从Azure服务总线接收到本地数据库中.运行控制台应用程序时,我收到以下错误
I have created a console application (.NET v4.5.2/4.6) to receive messages from the Azure service bus into on-premises database using Entity Framework 6. When running the console application, I'm receiving the following error
未处理的异常:System.IO.FileNotFoundException:无法加载文件或程序集'Microsoft.ServiceBus,Version = 3.0.0.0,文化=中性,PublicKeyToken = 31bf3856ad364e35'或其中之一依赖关系.系统找不到指定的文件.
Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.ServiceBus, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
能否请您分享解决此问题的想法?
Could you please share your thoughts to fix this issue?
推荐答案
我在这里找到了解决方案,这是一个dll参考问题.部署.exe文件时,出现问题.但是现在.exe以及支持的dll和参考文件被压缩为.zip格式.最后,我将.zip文件部署为Web作业.如我所料,它现在工作正常.
I found the solution here, It's a dll reference issue. When I deploy the .exe file I got an issue. But now .exe and along with the supporting dll and reference files are compressed as a .zip format. Finally I deploy the .zip file as a web job. It's working fine now as I expected.
这篇关于System.IO.FileNotFoundException:无法加载文件或程序集'Microsoft.ServiceBus,版本= 3.0.0.0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!