Skip to content
Permalink
Browse files

Fix: TypeLoadException in .net core app 3.0 (#2195)

Fixes #2194
  • Loading branch information...
anaisbetts authored and glennawatson committed Oct 4, 2019
1 parent f5f8d9a commit 382ac40350f1913a15c76ee6a6c585db49af8aa6
Showing with 5 additions and 1 deletion.
  1. +5 −1 src/ReactiveUI.Wpf/Registrations.cs
@@ -34,7 +34,11 @@ public void Register(Action<Func<object>, Type> registerFunction)

RxApp.TaskpoolScheduler = TaskPoolScheduler.Default;

RxApp.MainThreadScheduler = new WaitForDispatcherScheduler(() => DispatcherScheduler.Current);
if (!ModeDetector.InUnitTestRunner())
{
// NB: On .NET Core, trying to touch DispatcherScheduler blows up :cry:
RxApp.MainThreadScheduler = new WaitForDispatcherScheduler(() => DispatcherScheduler.Current);
}

RxApp.SuppressViewCommandBindingMessage = true;
}

0 comments on commit 382ac40

Please sign in to comment.
You can’t perform that action at this time.