c使用Mono在Ubuntu上运行Azure的二进制文件

时间:2017-10-26 10:48:27

标签: c# azure ubuntu mono

我在运行在Visual Studio中编译的二进制文件时遇到问题。它使用Azure Service Bus和管理SDK。它适用于Windows Mono,但不适用于Ubuntu。该解决方案使用.Net Framework 4.6编译。它在Windows上运行正常。

我在Ubuntu上下载Mono-Runtime并尝试在控制台上运行。这是我得到的错误。

Could not load signature of Microsoft.Rest.TokenCredentials:ProcessHttpRequestAsync due to: Could not load file or assembly 'System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. assembly:System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a type:<unknown type> member:<none>

Unhandled Exception:
System.TypeLoadException: Could not load type 'Microsoft.Rest.TokenCredentials' from assembly ''.
  at TestProject.ServiceBusManager..ctor () [0x00022] in <361059fca0ba4fdb9746f81f381c6004>:0 
  at Example.Program.Main (System.String[] args) [0x00019] in <4839397d23d646a0b5d49866c41eba66>:0 
[ERROR] FATAL UNHANDLED EXCEPTION: System.TypeLoadException: Could not load type 'Microsoft.Rest.TokenCredentials' from assembly ''.
  at TestProject.ServiceBusManager..ctor () [0x00022] in <361059fca0ba4fdb9746f81f381c6004>:0 
  at Example.Program.Main (System.String[] args) [0x00019] in <4839397d23d646a0b5d49866c41eba66>:0

0 个答案:

没有答案