简体   繁体   English

向 Azure 服务总线主题发送消息时出现异常

[英]Exception while sending message to Azure Service Bus Topics

While sending messages to Azure Service Bus Topics from existing.Net application, I am getting following exception从现有的 .Net 应用程序向 Azure 服务总线主题发送消息时,出现以下异常

The type initializer for 'Azure.Messaging.ServiceBus.Core.ClientLibraryInformation' threw an exception. “Azure.Messaging.ServiceBus.Core.ClientLibraryInformation”的类型初始值设定项引发异常。 Could not load file or assembly 'System.Runtime.InteropServices.RuntimeInformation, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.无法加载文件或程序集“System.Runtime.InteropServices.RuntimeInformation,Version=4.0.0.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a”或其依赖项之一。 The located assembly's manifest definition does not match the assembly reference.找到的程序集的清单定义与程序集引用不匹配。 (Exception from HRESULT: 0x80131040) (HRESULT 异常:0x80131040)

The above is working fine in a new.Net Core application.以上在新的 .Net Core 应用程序中运行良好。 I am unable to find out what is wrong.我无法找出问题所在。

While sending messages to Azure Service Bus Topics from existing.Net application, I am getting following exception从现有.Net 应用程序向 Azure 服务总线主题发送消息时,出现以下异常

The type initializer for 'Azure.Messaging.ServiceBus.Core.ClientLibraryInformation' threw an exception. “Azure.Messaging.ServiceBus.Core.ClientLibraryInformation”的类型初始化程序引发异常。 Could not load file or assembly 'System.Runtime.InteropServices.RuntimeInformation, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.无法加载文件或程序集 'System.Runtime.InteropServices.RuntimeInformation, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' 或其依赖项之一。 The located assembly's manifest definition does not match the assembly reference.找到的程序集的清单定义与程序集引用不匹配。 (Exception from HRESULT: 0x80131040) (来自 HRESULT 的异常:0x80131040)

The above is working fine in a new.Net Core application.以上在新的.Net Core 应用程序中运行良好。 I am unable to find out what is wrong.我无法找出问题所在。

I had to manually update the references.我不得不手动更新参考。 When I did this, the method started working fine.当我这样做时,该方法开始正常工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM