我刚刚在我的ubuntu机器上升级到刚刚发布的 Mono版本4.0.1 。 以前安装的单声道版本是3.2.7(如果我没有记错的话)。
现在的问题:
我的第一个问题是关于SignalR和自托pipe。 我有一个.NET 4.5.1控制台应用程序,我使用OWIN自己托pipeNancyFx,Web Api和SignalR。 当在单声道3.2.7上运行时,我的知识没有问题,但是当我尝试在单声道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。
作为一个侧面说明,我已经编译了所有我的程序集在新的单声道版本。
亲切的问候,西蒙
这原来是最近修复的单声道问题: https : //bugzilla.xamarin.com/show_bug.cgi?id=29665