diff --git a/src/Directory.Packages.props b/src/Directory.Packages.props
index e99461249b..88e89380ce 100644
--- a/src/Directory.Packages.props
+++ b/src/Directory.Packages.props
@@ -70,7 +70,7 @@
-
+
diff --git a/src/ServiceControl.Config/AppBootstrapper.cs b/src/ServiceControl.Config/AppBootstrapper.cs
index b3a0554f0a..4b8d0d19c6 100644
--- a/src/ServiceControl.Config/AppBootstrapper.cs
+++ b/src/ServiceControl.Config/AppBootstrapper.cs
@@ -11,7 +11,6 @@
using Caliburn.Micro;
using FluentValidation;
using ReactiveUI;
- using ReactiveUI.Builder;
using ServiceControl.Config.Framework;
using ServiceControlInstaller.Engine.Validation;
using UI.Shell;
@@ -42,18 +41,17 @@ protected override void Configure()
DisableRxUIDebuggerBreak();
}
- // ReactiveUI's default handler calls Debugger.Break() on unhandled reactive exceptions, which pauses at an unhelpful
- // internal location. This replaces it so exceptions are re-thrown on the main thread with a useful stack trace instead.
void DisableRxUIDebuggerBreak()
{
- _ = RxAppBuilder.CreateReactiveUIBuilder()
- .WithExceptionHandler(Observer.Create(delegate (Exception ex)
+ RxApp.DefaultExceptionHandler = Observer.Create(delegate (Exception ex)
+ {
+ RxApp.MainThreadScheduler.Schedule(() =>
{
- _ = RxSchedulers.MainThreadScheduler.Schedule(() => throw new Exception(
- "An OnError occurred on an object (usually ObservableAsPropertyHelper) that would break a binding or command. To prevent this, Subscribe to the ThrownExceptions property of your objects",
- ex));
- }))
- .BuildApp();
+ throw new Exception(
+ "An OnError occurred on an object (usually ObservableAsPropertyHelper) that would break a binding or command. To prevent this, Subscribe to the ThrownExceptions property of your objects",
+ ex);
+ });
+ });
}
protected override object GetInstance(Type service, string key)