asp.net-在Ubuntu上更新到Mono 4.0.1之后的问题

我刚刚在ubuntu机器上升级到了刚刚发布的Mono版本4.0.1.以前安装的mono版本是3.2.7(如果我没有记错的话).

现在的问题:

我的第一个问题是关于SignalR和自我托管.我有一个.NET 4.5.1控制台应用程序,其中使用OWIN自托管NancyFx,Web Api和SignalR.在mono 3.2.7上运行时,据我所知没有任何问题,但是当我尝试在mono 4.0.1上启动应用程序时,得到以下堆栈跟踪:

Unhandled Exception:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.InvalidProgramException: Invalid IL code in (wrapper delegate-invoke) <Module>:invoke_callvirt_CancellationTokenRegistration_CancellationToken&_Action`1<object>_object (System.Threading.CancellationToken&,System.Action`1<object>,object): IL_0057: castclass 0x00000007

  at Microsoft.AspNet.SignalR.Infrastructure.CancellationTokenExtensions.SafeRegister (CancellationToken cancellationToken, System.Action`1 callback, System.Object state) [0x00000] in <filename unknown>:0 
  at Microsoft.AspNet.SignalR.Hosting.HostDependencyResolverExtensions.InitializeResolverDispose (IDependencyResolver resolver, CancellationToken hostShutdownToken) [0x00000] in <filename unknown>:0 
  at Microsoft.AspNet.SignalR.Hosting.HostDependencyResolverExtensions.InitializeHost (IDependencyResolver resolver, System.String instanceName, CancellationToken hostShutdownToken) [0x00000] in <filename unknown>:0 
  at Owin.OwinExtensions.UseSignalRMiddleware[HubDispatcherMiddleware] (IAppBuilder builder, System.Object[] args) [0x00000] in <filename unknown>:0 
  at Owin.OwinExtensions.RunSignalR (IAppBuilder builder, Microsoft.AspNet.SignalR.HubConfiguration configuration) [0x00000] in <filename unknown>:0 
  at Owin.OwinExtensions+<>c__DisplayClass1.<MapSignalR>b__0 (IAppBuilder subApp) [0x00000] in <filename unknown>:0 
  at Owin.MapExtensions.Map (IAppBuilder app, PathString pathMatch, System.Action`1 configuration) [0x00000] in <filename unknown>:0 
  at Owin.MapExtensions.Map (IAppBuilder app, System.String pathMatch, System.Action`1 configuration) [0x00000] in <filename unknown>:0 
  at Owin.OwinExtensions.MapSignalR (IAppBuilder builder, System.String path, Microsoft.AspNet.SignalR.HubConfiguration configuration) [0x00000] in <filename unknown>:0 
  at Owin.OwinExtensions.MapSignalR (IAppBuilder builder, Microsoft.AspNet.SignalR.HubConfiguration configuration) [0x00000] in <filename unknown>:0 
  at Owin.OwinExtensions.MapSignalR (IAppBuilder builder) [0x00000] in <filename unknown>:0 

我不知道此错误可能意味着什么,我非常感谢您的协助.我正在使用Microsoft ASP.NET SignalR Self Host软件包版本2.2.0.

另外,我已经在新的mono版本上编译了所有程序集.

亲切的问候,
西蒙

最佳答案
原来这是一个Mono问题,最近已解决:https://bugzilla.xamarin.com/show_bug.cgi?id=29665

转载注明原文:asp.net-在Ubuntu上更新到Mono 4.0.1之后的问题 - 代码日志