当我调用Azure MobileService客户端时,我收到以下类型初始化错误:
System.TypeInitializationException: An exception was thrown by the type initializer for
Microsoft.WindowsAzure.MobileServices.MobileServiceClient
---> System.InvalidProgramException: Invalid IL code in System.Net.Http.HttpMethod:get_Post (): method body is empty.
at Microsoft.WindowsAzure.MobileServices.MobileServiceClient..cctor () [0x00000] in <filename unknown>:0
--- End of inner exception stack trace ---
at rpitemp.Program.Main (System.String[] args) [0x00000] in <filename unknown>:0
在多年的编程中,我从未见过“无效的IL代码”异常
我现在这样称呼它:
MobileServiceClient MobileService = new MobileServiceClient("https://<removed>.azure-mobile.net/", "<keyhere>");
问题是什么?此代码将在Raspberry Pi上使用Mono运行。