diff --git a/src/Directory.build.props b/src/Directory.build.props
index 497faf6099..53289c2f89 100644
--- a/src/Directory.build.props
+++ b/src/Directory.build.props
@@ -70,10 +70,6 @@
-
-
-
-
diff --git a/src/ReactiveUI.AndroidSupport/GlobalUsings.cs b/src/ReactiveUI.AndroidSupport/GlobalUsings.cs
new file mode 100644
index 0000000000..b591ca56d6
--- /dev/null
+++ b/src/ReactiveUI.AndroidSupport/GlobalUsings.cs
@@ -0,0 +1,16 @@
+// Copyright (c) 2023 .NET Foundation and Contributors. All rights reserved.
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for full license information.
+
+global using global::Splat;
+global using global::System;
+global using global::System.Collections.Generic;
+global using global::System.ComponentModel;
+global using global::System.Diagnostics.CodeAnalysis;
+global using global::System.Linq;
+global using global::System.Reactive;
+global using global::System.Reactive.Linq;
+global using global::System.Reactive.Subjects;
+global using global::System.Reactive.Threading.Tasks;
+global using global::System.Threading.Tasks;
diff --git a/src/ReactiveUI.AndroidSupport/ReactiveAppCompatActivity.cs b/src/ReactiveUI.AndroidSupport/ReactiveAppCompatActivity.cs
index df2980df31..edada6458c 100644
--- a/src/ReactiveUI.AndroidSupport/ReactiveAppCompatActivity.cs
+++ b/src/ReactiveUI.AndroidSupport/ReactiveAppCompatActivity.cs
@@ -3,9 +3,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.
-using System.ComponentModel;
-using System.Diagnostics.CodeAnalysis;
-
using Android.App;
using Android.Content;
using Android.Runtime;
@@ -194,4 +191,4 @@ protected override void Dispose(bool disposing)
base.Dispose(disposing);
}
-}
\ No newline at end of file
+}
diff --git a/src/ReactiveUI.AndroidSupport/ReactiveDialogFragment.cs b/src/ReactiveUI.AndroidSupport/ReactiveDialogFragment.cs
index 59fc50502e..57244aa13b 100644
--- a/src/ReactiveUI.AndroidSupport/ReactiveDialogFragment.cs
+++ b/src/ReactiveUI.AndroidSupport/ReactiveDialogFragment.cs
@@ -3,9 +3,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.
-using System.ComponentModel;
-using System.Diagnostics.CodeAnalysis;
-
namespace ReactiveUI.AndroidSupport;
///
diff --git a/src/ReactiveUI.AndroidSupport/ReactiveFragment.cs b/src/ReactiveUI.AndroidSupport/ReactiveFragment.cs
index 4a9188b917..aa2f484a0c 100644
--- a/src/ReactiveUI.AndroidSupport/ReactiveFragment.cs
+++ b/src/ReactiveUI.AndroidSupport/ReactiveFragment.cs
@@ -3,9 +3,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.
-using System.ComponentModel;
-using System.Diagnostics.CodeAnalysis;
-
namespace ReactiveUI.AndroidSupport;
///
diff --git a/src/ReactiveUI.AndroidSupport/ReactiveFragmentActivity.cs b/src/ReactiveUI.AndroidSupport/ReactiveFragmentActivity.cs
index ba035bd412..5b00dd78b6 100644
--- a/src/ReactiveUI.AndroidSupport/ReactiveFragmentActivity.cs
+++ b/src/ReactiveUI.AndroidSupport/ReactiveFragmentActivity.cs
@@ -3,9 +3,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.
-using System.ComponentModel;
-using System.Diagnostics.CodeAnalysis;
-
using Android.App;
using Android.Content;
using Android.Support.V4.App;
diff --git a/src/ReactiveUI.AndroidSupport/ReactivePagerAdapter.cs b/src/ReactiveUI.AndroidSupport/ReactivePagerAdapter.cs
index 1d0be4f8aa..132d570b33 100644
--- a/src/ReactiveUI.AndroidSupport/ReactivePagerAdapter.cs
+++ b/src/ReactiveUI.AndroidSupport/ReactivePagerAdapter.cs
@@ -4,7 +4,6 @@
// See the LICENSE file in the project root for full license information.
using System.Collections.Specialized;
-using System.Diagnostics.CodeAnalysis;
using Android.Support.V4.View;
using Android.Views;
diff --git a/src/ReactiveUI.AndroidSupport/ReactivePreferenceFragment.cs b/src/ReactiveUI.AndroidSupport/ReactivePreferenceFragment.cs
index bae00c248a..b135cb8bcd 100644
--- a/src/ReactiveUI.AndroidSupport/ReactivePreferenceFragment.cs
+++ b/src/ReactiveUI.AndroidSupport/ReactivePreferenceFragment.cs
@@ -3,9 +3,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.
-using System.ComponentModel;
-using System.Diagnostics.CodeAnalysis;
-
using Android.Runtime;
using Android.Support.V7.Preferences;
diff --git a/src/ReactiveUI.AndroidSupport/ReactiveRecyclerViewAdapter.cs b/src/ReactiveUI.AndroidSupport/ReactiveRecyclerViewAdapter.cs
index 0cee078098..9a4b0470cc 100644
--- a/src/ReactiveUI.AndroidSupport/ReactiveRecyclerViewAdapter.cs
+++ b/src/ReactiveUI.AndroidSupport/ReactiveRecyclerViewAdapter.cs
@@ -4,7 +4,6 @@
// See the LICENSE file in the project root for full license information.
using System.Collections.Specialized;
-using System.Diagnostics.CodeAnalysis;
using Android.Support.V7.Widget;
using Android.Views;
diff --git a/src/ReactiveUI.AndroidSupport/ReactiveRecyclerViewViewHolder.cs b/src/ReactiveUI.AndroidSupport/ReactiveRecyclerViewViewHolder.cs
index 663ffbb76e..5770eed57b 100644
--- a/src/ReactiveUI.AndroidSupport/ReactiveRecyclerViewViewHolder.cs
+++ b/src/ReactiveUI.AndroidSupport/ReactiveRecyclerViewViewHolder.cs
@@ -3,8 +3,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.
-using System.ComponentModel;
-using System.Diagnostics.CodeAnalysis;
using System.Reflection;
using System.Runtime.Serialization;
diff --git a/src/ReactiveUI.AndroidX/GlobalUsings.cs b/src/ReactiveUI.AndroidX/GlobalUsings.cs
new file mode 100644
index 0000000000..b591ca56d6
--- /dev/null
+++ b/src/ReactiveUI.AndroidX/GlobalUsings.cs
@@ -0,0 +1,16 @@
+// Copyright (c) 2023 .NET Foundation and Contributors. All rights reserved.
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for full license information.
+
+global using global::Splat;
+global using global::System;
+global using global::System.Collections.Generic;
+global using global::System.ComponentModel;
+global using global::System.Diagnostics.CodeAnalysis;
+global using global::System.Linq;
+global using global::System.Reactive;
+global using global::System.Reactive.Linq;
+global using global::System.Reactive.Subjects;
+global using global::System.Reactive.Threading.Tasks;
+global using global::System.Threading.Tasks;
diff --git a/src/ReactiveUI.AndroidX/ReactiveAppCompatActivity.cs b/src/ReactiveUI.AndroidX/ReactiveAppCompatActivity.cs
index 3ee71de86a..4873040311 100644
--- a/src/ReactiveUI.AndroidX/ReactiveAppCompatActivity.cs
+++ b/src/ReactiveUI.AndroidX/ReactiveAppCompatActivity.cs
@@ -3,9 +3,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.
-using System.ComponentModel;
-using System.Diagnostics.CodeAnalysis;
-
using Android.App;
using Android.Content;
using Android.Runtime;
@@ -196,4 +193,4 @@ protected override void Dispose(bool disposing)
base.Dispose(disposing);
}
-}
\ No newline at end of file
+}
diff --git a/src/ReactiveUI.AndroidX/ReactiveDialogFragment.cs b/src/ReactiveUI.AndroidX/ReactiveDialogFragment.cs
index b7b3a658e1..7f8c86bc7d 100644
--- a/src/ReactiveUI.AndroidX/ReactiveDialogFragment.cs
+++ b/src/ReactiveUI.AndroidX/ReactiveDialogFragment.cs
@@ -3,9 +3,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.
-using System.ComponentModel;
-using System.Diagnostics.CodeAnalysis;
-
namespace ReactiveUI.AndroidX;
///
diff --git a/src/ReactiveUI.AndroidX/ReactiveFragment.cs b/src/ReactiveUI.AndroidX/ReactiveFragment.cs
index 2c2a4f3c13..3cfdbc9917 100644
--- a/src/ReactiveUI.AndroidX/ReactiveFragment.cs
+++ b/src/ReactiveUI.AndroidX/ReactiveFragment.cs
@@ -3,9 +3,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.
-using System.ComponentModel;
-using System.Diagnostics.CodeAnalysis;
-
namespace ReactiveUI.AndroidX;
///
diff --git a/src/ReactiveUI.AndroidX/ReactiveFragmentActivity.cs b/src/ReactiveUI.AndroidX/ReactiveFragmentActivity.cs
index a4b37874da..1e640e4210 100644
--- a/src/ReactiveUI.AndroidX/ReactiveFragmentActivity.cs
+++ b/src/ReactiveUI.AndroidX/ReactiveFragmentActivity.cs
@@ -3,9 +3,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.
-using System.ComponentModel;
-using System.Diagnostics.CodeAnalysis;
-
using Android.App;
using Android.Content;
diff --git a/src/ReactiveUI.AndroidX/ReactivePagerAdapter.cs b/src/ReactiveUI.AndroidX/ReactivePagerAdapter.cs
index 7ee371f0a1..f4df199a34 100644
--- a/src/ReactiveUI.AndroidX/ReactivePagerAdapter.cs
+++ b/src/ReactiveUI.AndroidX/ReactivePagerAdapter.cs
@@ -4,7 +4,6 @@
// See the LICENSE file in the project root for full license information.
using System.Collections.Specialized;
-using System.Diagnostics.CodeAnalysis;
using Android.Views;
diff --git a/src/ReactiveUI.AndroidX/ReactivePreferenceFragment.cs b/src/ReactiveUI.AndroidX/ReactivePreferenceFragment.cs
index 047d88d18b..98dd3e6aac 100644
--- a/src/ReactiveUI.AndroidX/ReactivePreferenceFragment.cs
+++ b/src/ReactiveUI.AndroidX/ReactivePreferenceFragment.cs
@@ -3,9 +3,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.
-using System.ComponentModel;
-using System.Diagnostics.CodeAnalysis;
-
using Android.Runtime;
using AndroidX.Preference;
diff --git a/src/ReactiveUI.AndroidX/ReactiveRecyclerViewAdapter.cs b/src/ReactiveUI.AndroidX/ReactiveRecyclerViewAdapter.cs
index f7e16cb7b5..d596d9509c 100644
--- a/src/ReactiveUI.AndroidX/ReactiveRecyclerViewAdapter.cs
+++ b/src/ReactiveUI.AndroidX/ReactiveRecyclerViewAdapter.cs
@@ -4,7 +4,6 @@
// See the LICENSE file in the project root for full license information.
using System.Collections.Specialized;
-using System.Diagnostics.CodeAnalysis;
using AndroidX.RecyclerView.Widget;
diff --git a/src/ReactiveUI.AndroidX/ReactiveRecyclerViewViewHolder.cs b/src/ReactiveUI.AndroidX/ReactiveRecyclerViewViewHolder.cs
index d4e463caae..075037125a 100644
--- a/src/ReactiveUI.AndroidX/ReactiveRecyclerViewViewHolder.cs
+++ b/src/ReactiveUI.AndroidX/ReactiveRecyclerViewViewHolder.cs
@@ -3,8 +3,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.
-using System.ComponentModel;
-using System.Diagnostics.CodeAnalysis;
using System.Reflection;
using System.Runtime.Serialization;
diff --git a/src/ReactiveUI.Blazor/GlobalUsings.cs b/src/ReactiveUI.Blazor/GlobalUsings.cs
new file mode 100644
index 0000000000..613df22133
--- /dev/null
+++ b/src/ReactiveUI.Blazor/GlobalUsings.cs
@@ -0,0 +1,15 @@
+// Copyright (c) 2023 .NET Foundation and Contributors. All rights reserved.
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for full license information.
+
+global using global::System;
+global using global::System.Collections.Generic;
+global using global::System.ComponentModel;
+global using global::System.Diagnostics.CodeAnalysis;
+global using global::System.Linq;
+global using global::System.Reactive;
+global using global::System.Reactive.Concurrency;
+global using global::System.Reactive.Disposables;
+global using global::System.Reactive.Linq;
+global using global::System.Reactive.Subjects;
diff --git a/src/ReactiveUI.Blazor/ReactiveComponentBase.cs b/src/ReactiveUI.Blazor/ReactiveComponentBase.cs
index 771abde0e8..87183efc58 100644
--- a/src/ReactiveUI.Blazor/ReactiveComponentBase.cs
+++ b/src/ReactiveUI.Blazor/ReactiveComponentBase.cs
@@ -3,8 +3,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.
-using System.ComponentModel;
-using System.Diagnostics.CodeAnalysis;
using System.Runtime.CompilerServices;
using Microsoft.AspNetCore.Components;
@@ -134,4 +132,4 @@ protected virtual void Dispose(bool disposing)
_disposedValue = true;
}
}
-}
\ No newline at end of file
+}
diff --git a/src/ReactiveUI.Blazor/ReactiveInjectableComponentBase.cs b/src/ReactiveUI.Blazor/ReactiveInjectableComponentBase.cs
index e5edc91cb2..1cecdc083c 100644
--- a/src/ReactiveUI.Blazor/ReactiveInjectableComponentBase.cs
+++ b/src/ReactiveUI.Blazor/ReactiveInjectableComponentBase.cs
@@ -3,8 +3,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.
-using System.ComponentModel;
-using System.Diagnostics.CodeAnalysis;
using System.Runtime.CompilerServices;
using Microsoft.AspNetCore.Components;
diff --git a/src/ReactiveUI.Blazor/ReactiveLayoutComponentBase.cs b/src/ReactiveUI.Blazor/ReactiveLayoutComponentBase.cs
index 96908336e2..e7cbd91023 100644
--- a/src/ReactiveUI.Blazor/ReactiveLayoutComponentBase.cs
+++ b/src/ReactiveUI.Blazor/ReactiveLayoutComponentBase.cs
@@ -3,7 +3,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.
-using System.ComponentModel;
using System.Runtime.CompilerServices;
using Microsoft.AspNetCore.Components;
diff --git a/src/ReactiveUI.Blend/GlobalUsings.cs b/src/ReactiveUI.Blend/GlobalUsings.cs
new file mode 100644
index 0000000000..edf779595e
--- /dev/null
+++ b/src/ReactiveUI.Blend/GlobalUsings.cs
@@ -0,0 +1,7 @@
+// Copyright (c) 2023 .NET Foundation and Contributors. All rights reserved.
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for full license information.
+
+global using global::System;
+global using global::System.Reactive.Linq;
diff --git a/src/ReactiveUI.Drawing/GlobalUsings.cs b/src/ReactiveUI.Drawing/GlobalUsings.cs
new file mode 100644
index 0000000000..12d0eacf69
--- /dev/null
+++ b/src/ReactiveUI.Drawing/GlobalUsings.cs
@@ -0,0 +1,7 @@
+// Copyright (c) 2023 .NET Foundation and Contributors. All rights reserved.
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for full license information.
+
+global using global::Splat;
+global using global::System;
diff --git a/src/ReactiveUI.Maui/GlobalUsings.cs b/src/ReactiveUI.Maui/GlobalUsings.cs
new file mode 100644
index 0000000000..14741f2472
--- /dev/null
+++ b/src/ReactiveUI.Maui/GlobalUsings.cs
@@ -0,0 +1,17 @@
+// Copyright (c) 2023 .NET Foundation and Contributors. All rights reserved.
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for full license information.
+
+global using global::Splat;
+global using global::System;
+global using global::System.ComponentModel;
+global using global::System.Linq;
+global using global::System.Linq.Expressions;
+global using global::System.Reactive;
+global using global::System.Reactive.Concurrency;
+global using global::System.Reactive.Disposables;
+global using global::System.Reactive.Linq;
+global using global::System.Reactive.Subjects;
+global using global::System.Threading;
+global using global::System.Threading.Tasks;
diff --git a/src/ReactiveUI.Splat.Tests/GlobalUsings.cs b/src/ReactiveUI.Splat.Tests/GlobalUsings.cs
new file mode 100644
index 0000000000..1bf201126a
--- /dev/null
+++ b/src/ReactiveUI.Splat.Tests/GlobalUsings.cs
@@ -0,0 +1,9 @@
+// Copyright (c) 2023 .NET Foundation and Contributors. All rights reserved.
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for full license information.
+
+global using global::Splat;
+global using global::System.Collections.Generic;
+global using global::System.Linq;
+global using global::System.Reactive.Linq;
diff --git a/src/ReactiveUI.Testing.Tests/GlobalUsings.cs b/src/ReactiveUI.Testing.Tests/GlobalUsings.cs
new file mode 100644
index 0000000000..4522100c3f
--- /dev/null
+++ b/src/ReactiveUI.Testing.Tests/GlobalUsings.cs
@@ -0,0 +1,11 @@
+// Copyright (c) 2023 .NET Foundation and Contributors. All rights reserved.
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for full license information.
+
+global using global::System;
+global using global::System.Collections.Generic;
+global using global::System.Reactive;
+global using global::System.Reactive.Linq;
+global using global::System.Reactive.Subjects;
+global using global::System.Threading.Tasks;
diff --git a/src/ReactiveUI.Testing.Tests/TestFixture.cs b/src/ReactiveUI.Testing.Tests/TestFixture.cs
index 0685bafe3c..4197b023e2 100644
--- a/src/ReactiveUI.Testing.Tests/TestFixture.cs
+++ b/src/ReactiveUI.Testing.Tests/TestFixture.cs
@@ -3,8 +3,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.
-using System.Diagnostics.CodeAnalysis;
-
namespace ReactiveUI.Testing.Tests
{
///
diff --git a/src/ReactiveUI.Testing/GlobalUsings.cs b/src/ReactiveUI.Testing/GlobalUsings.cs
new file mode 100644
index 0000000000..21eb579880
--- /dev/null
+++ b/src/ReactiveUI.Testing/GlobalUsings.cs
@@ -0,0 +1,12 @@
+// Copyright (c) 2023 .NET Foundation and Contributors. All rights reserved.
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for full license information.
+
+global using global::System;
+global using global::System.Collections.Generic;
+global using global::System.Reactive;
+global using global::System.Reactive.Concurrency;
+global using global::System.Reactive.Disposables;
+global using global::System.Threading;
+global using global::System.Threading.Tasks;
diff --git a/src/ReactiveUI.Tests/API/ApiApprovalTests.cs b/src/ReactiveUI.Tests/API/ApiApprovalTests.cs
index 960bad73ab..8c5f7246cf 100644
--- a/src/ReactiveUI.Tests/API/ApiApprovalTests.cs
+++ b/src/ReactiveUI.Tests/API/ApiApprovalTests.cs
@@ -3,12 +3,8 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.
-using System.Diagnostics.CodeAnalysis;
-
using VerifyXunit;
-using Xunit;
-
namespace ReactiveUI.Tests.API
{
///
diff --git a/src/ReactiveUI.Tests/Activation/ActivatingViewModelTests.cs b/src/ReactiveUI.Tests/Activation/ActivatingViewModelTests.cs
index 04c7dd0009..c3e7c25e68 100644
--- a/src/ReactiveUI.Tests/Activation/ActivatingViewModelTests.cs
+++ b/src/ReactiveUI.Tests/Activation/ActivatingViewModelTests.cs
@@ -3,8 +3,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.
-using Xunit;
-
namespace ReactiveUI.Tests
{
///
diff --git a/src/ReactiveUI.Tests/Activation/ActivatingViewTests.cs b/src/ReactiveUI.Tests/Activation/ActivatingViewTests.cs
index 78923500ff..da5b3c5390 100644
--- a/src/ReactiveUI.Tests/Activation/ActivatingViewTests.cs
+++ b/src/ReactiveUI.Tests/Activation/ActivatingViewTests.cs
@@ -3,8 +3,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.
-using Xunit;
-
namespace ReactiveUI.Tests
{
///
diff --git a/src/ReactiveUI.Tests/Activation/CanActivateViewFetcherTests.cs b/src/ReactiveUI.Tests/Activation/CanActivateViewFetcherTests.cs
index 075f13e862..985db7b179 100644
--- a/src/ReactiveUI.Tests/Activation/CanActivateViewFetcherTests.cs
+++ b/src/ReactiveUI.Tests/Activation/CanActivateViewFetcherTests.cs
@@ -7,8 +7,6 @@
using ReactiveUI.Tests.Winforms;
-using Xunit;
-
namespace ReactiveUI.Tests
{
///
diff --git a/src/ReactiveUI.Tests/Activation/ViewModelActivatorTests.cs b/src/ReactiveUI.Tests/Activation/ViewModelActivatorTests.cs
index 69c6780ec2..603bd25fbe 100644
--- a/src/ReactiveUI.Tests/Activation/ViewModelActivatorTests.cs
+++ b/src/ReactiveUI.Tests/Activation/ViewModelActivatorTests.cs
@@ -5,8 +5,6 @@
using DynamicData;
-using Xunit;
-
namespace ReactiveUI.Tests
{
///
diff --git a/src/ReactiveUI.Tests/AutoPersist/AutoPersistCollectionTests.cs b/src/ReactiveUI.Tests/AutoPersist/AutoPersistCollectionTests.cs
index 0a84e606cb..ddbc12248d 100644
--- a/src/ReactiveUI.Tests/AutoPersist/AutoPersistCollectionTests.cs
+++ b/src/ReactiveUI.Tests/AutoPersist/AutoPersistCollectionTests.cs
@@ -9,8 +9,6 @@
using ReactiveUI.Testing;
-using Xunit;
-
namespace ReactiveUI.Tests
{
///
diff --git a/src/ReactiveUI.Tests/AutoPersist/AutoPersistHelperTest.cs b/src/ReactiveUI.Tests/AutoPersist/AutoPersistHelperTest.cs
index 02320b6a2a..6f0acd45fe 100644
--- a/src/ReactiveUI.Tests/AutoPersist/AutoPersistHelperTest.cs
+++ b/src/ReactiveUI.Tests/AutoPersist/AutoPersistHelperTest.cs
@@ -7,8 +7,6 @@
using ReactiveUI.Testing;
-using Xunit;
-
namespace ReactiveUI.Tests
{
///
diff --git a/src/ReactiveUI.Tests/AwaiterTest.cs b/src/ReactiveUI.Tests/AwaiterTest.cs
index e5b3ec7468..f63cccd196 100644
--- a/src/ReactiveUI.Tests/AwaiterTest.cs
+++ b/src/ReactiveUI.Tests/AwaiterTest.cs
@@ -3,8 +3,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.
-using Xunit;
-
namespace ReactiveUI.Tests
{
///
diff --git a/src/ReactiveUI.Tests/BindingTypeConvertersTest.cs b/src/ReactiveUI.Tests/BindingTypeConvertersTest.cs
index 94d0169091..b126746147 100644
--- a/src/ReactiveUI.Tests/BindingTypeConvertersTest.cs
+++ b/src/ReactiveUI.Tests/BindingTypeConvertersTest.cs
@@ -3,8 +3,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.
-using Xunit;
-
namespace ReactiveUI.Tests
{
///
diff --git a/src/ReactiveUI.Tests/Commands/CombinedReactiveCommandTest.cs b/src/ReactiveUI.Tests/Commands/CombinedReactiveCommandTest.cs
index 00694a291a..4305d76d73 100644
--- a/src/ReactiveUI.Tests/Commands/CombinedReactiveCommandTest.cs
+++ b/src/ReactiveUI.Tests/Commands/CombinedReactiveCommandTest.cs
@@ -9,8 +9,6 @@
using ReactiveUI.Testing;
-using Xunit;
-
namespace ReactiveUI.Tests
{
///
diff --git a/src/ReactiveUI.Tests/Commands/CreatesCommandBindingTests.cs b/src/ReactiveUI.Tests/Commands/CreatesCommandBindingTests.cs
index 84caf78156..3c07adfcae 100644
--- a/src/ReactiveUI.Tests/Commands/CreatesCommandBindingTests.cs
+++ b/src/ReactiveUI.Tests/Commands/CreatesCommandBindingTests.cs
@@ -3,10 +3,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.
-using System.ComponentModel;
-
-using Xunit;
-
namespace ReactiveUI.Tests
{
///
diff --git a/src/ReactiveUI.Tests/Commands/ReactiveCommandTest.cs b/src/ReactiveUI.Tests/Commands/ReactiveCommandTest.cs
index fab386afc2..9bbe0aa134 100644
--- a/src/ReactiveUI.Tests/Commands/ReactiveCommandTest.cs
+++ b/src/ReactiveUI.Tests/Commands/ReactiveCommandTest.cs
@@ -11,8 +11,6 @@
using ReactiveUI.Testing;
-using Xunit;
-
namespace ReactiveUI.Tests
{
///
@@ -1165,36 +1163,48 @@ public void SynchronousCommandsFailCorrectly()
[Fact]
public async Task ReactiveCommandCreateFromTaskHandlesTaskExceptionAsync()
- {
- var subj = new Subject();
- var isExecuting = false;
- Exception? fail = null;
- var fixture = ReactiveCommand.CreateFromTask(
- async _ =>
+ {
+ using var testSequencer = new TestSequencer();
+ var subj = new Subject();
+ var isExecuting = false;
+ Exception? fail = null;
+ var fixture = ReactiveCommand.CreateFromTask(
+ async _ =>
+ {
+ await subj.Take(1);
+ throw new Exception("break execution");
+ },
+ outputScheduler: ImmediateScheduler.Instance);
+
+ fixture.IsExecuting.Subscribe(async x =>
{
- await subj.Take(1);
- throw new Exception("break execution");
- },
- outputScheduler: ImmediateScheduler.Instance);
-
- fixture.IsExecuting.Subscribe(x => isExecuting = x);
- fixture.ThrownExceptions.Subscribe(ex => fail = ex);
-
- Assert.False(isExecuting);
- Assert.Null(fail);
+ isExecuting = x;
+ await testSequencer.AdvancePhaseAsync("Executing {false, true, false}");
+ });
+ fixture.ThrownExceptions.Subscribe(async ex =>
+ {
+ fail = ex;
+ await testSequencer.AdvancePhaseAsync("Exception");
+ });
- fixture.Execute().Subscribe();
- Assert.True(isExecuting);
- Assert.Null(fail);
+ await testSequencer.AdvancePhaseAsync("Executing {false}");
+ Assert.False(isExecuting);
+ Assert.Null(fail);
- subj.OnNext(Unit.Default);
+ fixture.Execute().Subscribe();
+ await testSequencer.AdvancePhaseAsync("Executing {true}");
+ Assert.True(isExecuting);
+ Assert.Null(fail);
- // Wait 10 ms to allow execution to complete
- await Task.Delay(500).ConfigureAwait(false);
+ subj.OnNext(Unit.Default);
- Assert.False(isExecuting);
- Assert.Equal("break execution", fail?.Message);
- }
+ // Wait to allow execution to complete
+ await testSequencer.AdvancePhaseAsync("Executing {false}");
+ await testSequencer.AdvancePhaseAsync("Exception");
+ Assert.False(isExecuting);
+ Assert.Equal("break execution", fail?.Message);
+ testSequencer.Dispose();
+ }
[Fact]
public async Task ReactiveCommandExecutesFromInvokeCommand()
@@ -1215,5 +1225,29 @@ public async Task ReactiveCommandExecutesFromInvokeCommand()
testSequencer.Dispose();
}
+
+ [Fact]
+ public void ShouldCallAsyncMethodOnSettingReactiveSetpoint() =>
+ new TestScheduler().WithAsync(scheduler =>
+ {
+ // set
+ var fooVm = new Mocks.FooViewModel(new());
+
+ Assert.Equal(42, fooVm.Foo.Value); // initial value unchanged
+
+ // act
+ scheduler.AdvanceByMs(11); // async processing
+ Assert.Equal(0, fooVm.Foo.Value); // value set to default Setpoint value
+
+ fooVm.Setpoint = 123;
+ scheduler.AdvanceByMs(5); // async task processing
+
+ // assert
+ Assert.Equal(0, fooVm.Foo.Value); // value unchanged as async task still processing
+ scheduler.AdvanceByMs(6); // process async setpoint setting
+
+ Assert.Equal(123, fooVm.Foo.Value);
+ return Task.CompletedTask;
+ });
}
}
diff --git a/src/ReactiveUI.Tests/Comparers/OrderedComparerTests.cs b/src/ReactiveUI.Tests/Comparers/OrderedComparerTests.cs
index 463ab556b5..bc130ea00e 100644
--- a/src/ReactiveUI.Tests/Comparers/OrderedComparerTests.cs
+++ b/src/ReactiveUI.Tests/Comparers/OrderedComparerTests.cs
@@ -5,8 +5,6 @@
using System.Diagnostics;
-using Xunit;
-
namespace ReactiveUI.Tests
{
///
diff --git a/src/ReactiveUI.Tests/GlobalUsings.cs b/src/ReactiveUI.Tests/GlobalUsings.cs
new file mode 100644
index 0000000000..ac143d76b4
--- /dev/null
+++ b/src/ReactiveUI.Tests/GlobalUsings.cs
@@ -0,0 +1,21 @@
+// Copyright (c) 2023 .NET Foundation and Contributors. All rights reserved.
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for full license information.
+
+global using global::Splat;
+global using global::System;
+global using global::System.Collections.Generic;
+global using global::System.ComponentModel;
+global using global::System.Diagnostics.CodeAnalysis;
+global using global::System.Linq;
+global using global::System.Linq.Expressions;
+global using global::System.Reactive;
+global using global::System.Reactive.Concurrency;
+global using global::System.Reactive.Disposables;
+global using global::System.Reactive.Linq;
+global using global::System.Reactive.Subjects;
+global using global::System.Reactive.Threading.Tasks;
+global using global::System.Threading;
+global using global::System.Threading.Tasks;
+global using global::Xunit;
diff --git a/src/ReactiveUI.Tests/InteractionBinding/InteractionBinderImplementationTests.cs b/src/ReactiveUI.Tests/InteractionBinding/InteractionBinderImplementationTests.cs
index 3273176475..679d755cea 100644
--- a/src/ReactiveUI.Tests/InteractionBinding/InteractionBinderImplementationTests.cs
+++ b/src/ReactiveUI.Tests/InteractionBinding/InteractionBinderImplementationTests.cs
@@ -5,8 +5,6 @@
using FluentAssertions;
-using Xunit;
-
namespace ReactiveUI.Tests
{
///
diff --git a/src/ReactiveUI.Tests/InteractionsTest.cs b/src/ReactiveUI.Tests/InteractionsTest.cs
index d98727730c..b473ee291d 100644
--- a/src/ReactiveUI.Tests/InteractionsTest.cs
+++ b/src/ReactiveUI.Tests/InteractionsTest.cs
@@ -9,8 +9,6 @@
using ReactiveUI.Testing;
-using Xunit;
-
namespace ReactiveUI.Tests
{
///
diff --git a/src/ReactiveUI.Tests/Locator/DefaultViewLocatorTests.cs b/src/ReactiveUI.Tests/Locator/DefaultViewLocatorTests.cs
index 76e1ef4e40..50428f7716 100644
--- a/src/ReactiveUI.Tests/Locator/DefaultViewLocatorTests.cs
+++ b/src/ReactiveUI.Tests/Locator/DefaultViewLocatorTests.cs
@@ -3,8 +3,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.
-using Xunit;
-
namespace ReactiveUI.Tests
{
///
diff --git a/src/ReactiveUI.Tests/MessageBusTest.cs b/src/ReactiveUI.Tests/MessageBusTest.cs
index 217ecaa5e7..b3b03d311f 100644
--- a/src/ReactiveUI.Tests/MessageBusTest.cs
+++ b/src/ReactiveUI.Tests/MessageBusTest.cs
@@ -9,8 +9,6 @@
using ReactiveUI.Testing;
-using Xunit;
-
namespace ReactiveUI.Tests
{
///
diff --git a/src/ReactiveUI.Tests/Mocks/Foo.cs b/src/ReactiveUI.Tests/Mocks/Foo.cs
new file mode 100644
index 0000000000..c36d20603e
--- /dev/null
+++ b/src/ReactiveUI.Tests/Mocks/Foo.cs
@@ -0,0 +1,20 @@
+// Copyright (c) 2023 .NET Foundation and Contributors. All rights reserved.
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for full license information.
+
+namespace ReactiveUI.Tests.Mocks;
+
+public class Foo
+{
+ public Foo() => Value = 42;
+
+ public int Value { get; private set; }
+
+ public async Task SetValueAsync(int value)
+ {
+ await RxApp.TaskpoolScheduler.Sleep(TimeSpan.FromMilliseconds(10));
+ Value = value;
+ return Unit.Default;
+ }
+}
diff --git a/src/ReactiveUI.Tests/Mocks/FooViewModel.cs b/src/ReactiveUI.Tests/Mocks/FooViewModel.cs
new file mode 100644
index 0000000000..cf65ec1bd0
--- /dev/null
+++ b/src/ReactiveUI.Tests/Mocks/FooViewModel.cs
@@ -0,0 +1,25 @@
+// Copyright (c) 2023 .NET Foundation and Contributors. All rights reserved.
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for full license information.
+
+namespace ReactiveUI.Tests.Mocks;
+
+public class FooViewModel : ReactiveObject
+{
+ private int _setpoint;
+
+ public FooViewModel(Foo foo)
+ {
+ Foo = foo ?? throw new ArgumentNullException(nameof(foo));
+
+ this.WhenAnyValue(x => x.Setpoint)
+ ////.Skip(1) // Skip the initial value
+ .SelectMany(foo.SetValueAsync)
+ .Subscribe();
+ }
+
+ public int Setpoint { get => _setpoint; set => this.RaiseAndSetIfChanged(ref _setpoint, value); }
+
+ public Foo Foo { get; }
+}
diff --git a/src/ReactiveUI.Tests/ObservableAsPropertyHelper/ObservableAsPropertyHelperTest.cs b/src/ReactiveUI.Tests/ObservableAsPropertyHelper/ObservableAsPropertyHelperTest.cs
index 6febd8b067..e1acd421d6 100644
--- a/src/ReactiveUI.Tests/ObservableAsPropertyHelper/ObservableAsPropertyHelperTest.cs
+++ b/src/ReactiveUI.Tests/ObservableAsPropertyHelper/ObservableAsPropertyHelperTest.cs
@@ -9,8 +9,6 @@
using ReactiveUI.Testing;
-using Xunit;
-
namespace ReactiveUI.Tests
{
///
diff --git a/src/ReactiveUI.Tests/ObservedChanged/NewGameViewModelTests.cs b/src/ReactiveUI.Tests/ObservedChanged/NewGameViewModelTests.cs
index 1f64c5d9ab..de42a51a47 100644
--- a/src/ReactiveUI.Tests/ObservedChanged/NewGameViewModelTests.cs
+++ b/src/ReactiveUI.Tests/ObservedChanged/NewGameViewModelTests.cs
@@ -3,8 +3,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.
-using Xunit;
-
namespace ReactiveUI.Tests
{
///
diff --git a/src/ReactiveUI.Tests/ObservedChanged/ObservedChangedMixinTest.cs b/src/ReactiveUI.Tests/ObservedChanged/ObservedChangedMixinTest.cs
index c0cd17321d..e18a4005e9 100644
--- a/src/ReactiveUI.Tests/ObservedChanged/ObservedChangedMixinTest.cs
+++ b/src/ReactiveUI.Tests/ObservedChanged/ObservedChangedMixinTest.cs
@@ -7,8 +7,6 @@
using ReactiveUI.Testing;
-using Xunit;
-
namespace ReactiveUI.Tests
{
///
diff --git a/src/ReactiveUI.Tests/Platforms/common-gui/ObservableAsPropertyHelperModeTests.cs b/src/ReactiveUI.Tests/Platforms/common-gui/ObservableAsPropertyHelperModeTests.cs
index 80a646ef47..ac57280ba1 100644
--- a/src/ReactiveUI.Tests/Platforms/common-gui/ObservableAsPropertyHelperModeTests.cs
+++ b/src/ReactiveUI.Tests/Platforms/common-gui/ObservableAsPropertyHelperModeTests.cs
@@ -4,7 +4,6 @@
// See the LICENSE file in the project root for full license information.
using System.Diagnostics;
-using Xunit;
namespace ReactiveUI.Tests
{
diff --git a/src/ReactiveUI.Tests/Platforms/windows-xaml/Api/XamlApiApprovalTests.cs b/src/ReactiveUI.Tests/Platforms/windows-xaml/Api/XamlApiApprovalTests.cs
index c0a4b39274..e189a6a836 100644
--- a/src/ReactiveUI.Tests/Platforms/windows-xaml/Api/XamlApiApprovalTests.cs
+++ b/src/ReactiveUI.Tests/Platforms/windows-xaml/Api/XamlApiApprovalTests.cs
@@ -3,10 +3,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.
-using System.Diagnostics.CodeAnalysis;
-
-using Xunit;
-
namespace ReactiveUI.Tests.Xaml
{
///
diff --git a/src/ReactiveUI.Tests/Platforms/windows-xaml/CommandBindingImplementationTests.cs b/src/ReactiveUI.Tests/Platforms/windows-xaml/CommandBindingImplementationTests.cs
index b5525aeb34..18f896a3a6 100644
--- a/src/ReactiveUI.Tests/Platforms/windows-xaml/CommandBindingImplementationTests.cs
+++ b/src/ReactiveUI.Tests/Platforms/windows-xaml/CommandBindingImplementationTests.cs
@@ -3,8 +3,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.
-using Xunit;
-
#if NETFX_CORE
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
diff --git a/src/ReactiveUI.Tests/Platforms/windows-xaml/DependencyObjectObservableForPropertyTest.cs b/src/ReactiveUI.Tests/Platforms/windows-xaml/DependencyObjectObservableForPropertyTest.cs
index 52897d2a84..3c20a8dec8 100644
--- a/src/ReactiveUI.Tests/Platforms/windows-xaml/DependencyObjectObservableForPropertyTest.cs
+++ b/src/ReactiveUI.Tests/Platforms/windows-xaml/DependencyObjectObservableForPropertyTest.cs
@@ -4,7 +4,6 @@
// See the LICENSE file in the project root for full license information.
using DynamicData;
-using Xunit;
#if NETFX_CORE
using Windows.UI.Xaml;
diff --git a/src/ReactiveUI.Tests/Platforms/windows-xaml/PropertyBindingTest.cs b/src/ReactiveUI.Tests/Platforms/windows-xaml/PropertyBindingTest.cs
index b81f016001..51e9e1304d 100644
--- a/src/ReactiveUI.Tests/Platforms/windows-xaml/PropertyBindingTest.cs
+++ b/src/ReactiveUI.Tests/Platforms/windows-xaml/PropertyBindingTest.cs
@@ -8,8 +8,6 @@
using DynamicData.Binding;
-using Xunit;
-
#if NETFX_CORE
#else
diff --git a/src/ReactiveUI.Tests/Platforms/windows-xaml/RxAppDependencyObjectTests.cs b/src/ReactiveUI.Tests/Platforms/windows-xaml/RxAppDependencyObjectTests.cs
index 0e9b13f872..587dcd337e 100644
--- a/src/ReactiveUI.Tests/Platforms/windows-xaml/RxAppDependencyObjectTests.cs
+++ b/src/ReactiveUI.Tests/Platforms/windows-xaml/RxAppDependencyObjectTests.cs
@@ -3,8 +3,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.
-using Xunit;
-
namespace ReactiveUI.Tests.Xaml
{
///
diff --git a/src/ReactiveUI.Tests/Platforms/windows-xaml/WhenAnyThroughDependencyObjectTests.cs b/src/ReactiveUI.Tests/Platforms/windows-xaml/WhenAnyThroughDependencyObjectTests.cs
index fb95e400aa..31d4d34a2c 100644
--- a/src/ReactiveUI.Tests/Platforms/windows-xaml/WhenAnyThroughDependencyObjectTests.cs
+++ b/src/ReactiveUI.Tests/Platforms/windows-xaml/WhenAnyThroughDependencyObjectTests.cs
@@ -3,8 +3,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.
-using Xunit;
-
#if NETFX_CORE
#else
diff --git a/src/ReactiveUI.Tests/Platforms/windows-xaml/XamlViewCommandTests.cs b/src/ReactiveUI.Tests/Platforms/windows-xaml/XamlViewCommandTests.cs
index 4b0b4fc29b..928e2dd43d 100644
--- a/src/ReactiveUI.Tests/Platforms/windows-xaml/XamlViewCommandTests.cs
+++ b/src/ReactiveUI.Tests/Platforms/windows-xaml/XamlViewCommandTests.cs
@@ -3,8 +3,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.
-using Xunit;
-
#if NETFX_CORE
using Windows.UI.Xaml;
using Windows.UI.Xaml.Automation.Peers;
diff --git a/src/ReactiveUI.Tests/Platforms/windows-xaml/XamlViewDependencyResolverTests.cs b/src/ReactiveUI.Tests/Platforms/windows-xaml/XamlViewDependencyResolverTests.cs
index b388049ed1..8b5cff3f92 100644
--- a/src/ReactiveUI.Tests/Platforms/windows-xaml/XamlViewDependencyResolverTests.cs
+++ b/src/ReactiveUI.Tests/Platforms/windows-xaml/XamlViewDependencyResolverTests.cs
@@ -3,8 +3,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.
-using Xunit;
-
#if NETFX_CORE
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
diff --git a/src/ReactiveUI.Tests/Platforms/winforms/API/WinformsApiApprovalTests.cs b/src/ReactiveUI.Tests/Platforms/winforms/API/WinformsApiApprovalTests.cs
index a950b60b21..b17416acf8 100644
--- a/src/ReactiveUI.Tests/Platforms/winforms/API/WinformsApiApprovalTests.cs
+++ b/src/ReactiveUI.Tests/Platforms/winforms/API/WinformsApiApprovalTests.cs
@@ -3,12 +3,8 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.
-using System.Diagnostics.CodeAnalysis;
-
using VerifyXunit;
-using Xunit;
-
namespace ReactiveUI.Tests
{
///
diff --git a/src/ReactiveUI.Tests/Platforms/winforms/ActivationTests.cs b/src/ReactiveUI.Tests/Platforms/winforms/ActivationTests.cs
index 54a21ce34b..5b909f13f1 100644
--- a/src/ReactiveUI.Tests/Platforms/winforms/ActivationTests.cs
+++ b/src/ReactiveUI.Tests/Platforms/winforms/ActivationTests.cs
@@ -5,8 +5,6 @@
using System.Windows.Forms;
-using Xunit;
-
namespace ReactiveUI.Tests.Winforms
{
///
diff --git a/src/ReactiveUI.Tests/Platforms/winforms/CommandBindingImplementationTests.cs b/src/ReactiveUI.Tests/Platforms/winforms/CommandBindingImplementationTests.cs
index 62fec631f0..55241cd97e 100644
--- a/src/ReactiveUI.Tests/Platforms/winforms/CommandBindingImplementationTests.cs
+++ b/src/ReactiveUI.Tests/Platforms/winforms/CommandBindingImplementationTests.cs
@@ -5,7 +5,6 @@
using System.Windows.Forms;
using ReactiveUI.Testing;
-using Xunit;
namespace ReactiveUI.Tests.Winforms
{
diff --git a/src/ReactiveUI.Tests/Platforms/winforms/CommandBindingTests.cs b/src/ReactiveUI.Tests/Platforms/winforms/CommandBindingTests.cs
index ee51b012c1..b9d60314d2 100644
--- a/src/ReactiveUI.Tests/Platforms/winforms/CommandBindingTests.cs
+++ b/src/ReactiveUI.Tests/Platforms/winforms/CommandBindingTests.cs
@@ -7,8 +7,6 @@
using ReactiveUI.Testing;
using ReactiveUI.Winforms;
-using Xunit;
-
namespace ReactiveUI.Tests.Winforms
{
///
diff --git a/src/ReactiveUI.Tests/Platforms/winforms/DefaultPropertyBindingTests.cs b/src/ReactiveUI.Tests/Platforms/winforms/DefaultPropertyBindingTests.cs
index f181aa066d..7b6a892d72 100644
--- a/src/ReactiveUI.Tests/Platforms/winforms/DefaultPropertyBindingTests.cs
+++ b/src/ReactiveUI.Tests/Platforms/winforms/DefaultPropertyBindingTests.cs
@@ -10,8 +10,6 @@
using ReactiveUI.Winforms;
-using Xunit;
-
namespace ReactiveUI.Tests.Winforms
{
///
diff --git a/src/ReactiveUI.Tests/Platforms/winforms/Mocks/CustomClickableComponent.cs b/src/ReactiveUI.Tests/Platforms/winforms/Mocks/CustomClickableComponent.cs
index 74ad861648..d05870b4e1 100644
--- a/src/ReactiveUI.Tests/Platforms/winforms/Mocks/CustomClickableComponent.cs
+++ b/src/ReactiveUI.Tests/Platforms/winforms/Mocks/CustomClickableComponent.cs
@@ -3,8 +3,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.
-using System.ComponentModel;
-
namespace ReactiveUI.Tests.Winforms
{
///
diff --git a/src/ReactiveUI.Tests/Platforms/winforms/WinFormsRoutedViewHostTests.cs b/src/ReactiveUI.Tests/Platforms/winforms/WinFormsRoutedViewHostTests.cs
index bc0beaff97..9152466249 100644
--- a/src/ReactiveUI.Tests/Platforms/winforms/WinFormsRoutedViewHostTests.cs
+++ b/src/ReactiveUI.Tests/Platforms/winforms/WinFormsRoutedViewHostTests.cs
@@ -5,8 +5,6 @@
using System.Windows.Forms;
-using Xunit;
-
using WinFormsRoutedViewHost = ReactiveUI.Winforms.RoutedControlHost;
namespace ReactiveUI.Tests.Winforms
diff --git a/src/ReactiveUI.Tests/Platforms/winforms/WinFormsViewDependencyResolverTests.cs b/src/ReactiveUI.Tests/Platforms/winforms/WinFormsViewDependencyResolverTests.cs
index 596a775b5a..6f402092c8 100644
--- a/src/ReactiveUI.Tests/Platforms/winforms/WinFormsViewDependencyResolverTests.cs
+++ b/src/ReactiveUI.Tests/Platforms/winforms/WinFormsViewDependencyResolverTests.cs
@@ -3,8 +3,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.
-using Xunit;
-
using FactAttribute = Xunit.WpfFactAttribute;
namespace ReactiveUI.Tests.Winforms
diff --git a/src/ReactiveUI.Tests/Platforms/winforms/WinFormsViewModelViewHostTests.cs b/src/ReactiveUI.Tests/Platforms/winforms/WinFormsViewModelViewHostTests.cs
index 713bb70628..0909687f34 100644
--- a/src/ReactiveUI.Tests/Platforms/winforms/WinFormsViewModelViewHostTests.cs
+++ b/src/ReactiveUI.Tests/Platforms/winforms/WinFormsViewModelViewHostTests.cs
@@ -5,8 +5,6 @@
using System.Windows.Forms;
-using Xunit;
-
using WinFormsViewModelViewHost = ReactiveUI.Winforms.ViewModelControlHost;
namespace ReactiveUI.Tests.Winforms
diff --git a/src/ReactiveUI.Tests/Platforms/wpf/API/WpfApiApprovalTests.cs b/src/ReactiveUI.Tests/Platforms/wpf/API/WpfApiApprovalTests.cs
index eda570fbf0..0939eb6470 100644
--- a/src/ReactiveUI.Tests/Platforms/wpf/API/WpfApiApprovalTests.cs
+++ b/src/ReactiveUI.Tests/Platforms/wpf/API/WpfApiApprovalTests.cs
@@ -3,12 +3,8 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.
-using System.Diagnostics.CodeAnalysis;
-
using VerifyXunit;
-using Xunit;
-
namespace ReactiveUI.Tests.Wpf
{
///
diff --git a/src/ReactiveUI.Tests/Platforms/wpf/WpfActiveContentTests.cs b/src/ReactiveUI.Tests/Platforms/wpf/WpfActiveContentTests.cs
index 8ec52b1ab7..91e751d3d0 100644
--- a/src/ReactiveUI.Tests/Platforms/wpf/WpfActiveContentTests.cs
+++ b/src/ReactiveUI.Tests/Platforms/wpf/WpfActiveContentTests.cs
@@ -7,7 +7,6 @@
using DynamicData;
using ReactiveUI.Testing;
-using Xunit;
namespace ReactiveUI.Tests.Wpf
{
diff --git a/src/ReactiveUI.Tests/Platforms/wpf/WpfCommandBindingImplementationTests.cs b/src/ReactiveUI.Tests/Platforms/wpf/WpfCommandBindingImplementationTests.cs
index 413eada6a6..cc31aff00c 100644
--- a/src/ReactiveUI.Tests/Platforms/wpf/WpfCommandBindingImplementationTests.cs
+++ b/src/ReactiveUI.Tests/Platforms/wpf/WpfCommandBindingImplementationTests.cs
@@ -10,8 +10,6 @@
using FluentAssertions;
-using Xunit;
-
using FactAttribute = Xunit.WpfFactAttribute;
namespace ReactiveUI.Tests.Wpf
diff --git a/src/ReactiveUI.Tests/Platforms/wpf/WpfViewDependencyResolverTests.cs b/src/ReactiveUI.Tests/Platforms/wpf/WpfViewDependencyResolverTests.cs
index 76aaf95a76..8c477a8a54 100644
--- a/src/ReactiveUI.Tests/Platforms/wpf/WpfViewDependencyResolverTests.cs
+++ b/src/ReactiveUI.Tests/Platforms/wpf/WpfViewDependencyResolverTests.cs
@@ -3,8 +3,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.
-using Xunit;
-
using FactAttribute = Xunit.WpfFactAttribute;
namespace ReactiveUI.Tests.Wpf
diff --git a/src/ReactiveUI.Tests/RandomTests.cs b/src/ReactiveUI.Tests/RandomTests.cs
index 3637c5589a..3a5318ce79 100644
--- a/src/ReactiveUI.Tests/RandomTests.cs
+++ b/src/ReactiveUI.Tests/RandomTests.cs
@@ -3,8 +3,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.
-using Xunit;
-
namespace ReactiveUI.Tests
{
public class RandomTests
diff --git a/src/ReactiveUI.Tests/ReactiveObject/ReactiveObjectTests.cs b/src/ReactiveUI.Tests/ReactiveObject/ReactiveObjectTests.cs
index 89a1bee503..e89cf250f5 100644
--- a/src/ReactiveUI.Tests/ReactiveObject/ReactiveObjectTests.cs
+++ b/src/ReactiveUI.Tests/ReactiveObject/ReactiveObjectTests.cs
@@ -4,12 +4,9 @@
// See the LICENSE file in the project root for full license information.
using System.Collections;
-using System.ComponentModel;
using DynamicData;
-using Xunit;
-
namespace ReactiveUI.Tests
{
///
diff --git a/src/ReactiveUI.Tests/Resolvers/DependencyResolverTests.cs b/src/ReactiveUI.Tests/Resolvers/DependencyResolverTests.cs
index ec884eca9f..2ae2ddda99 100644
--- a/src/ReactiveUI.Tests/Resolvers/DependencyResolverTests.cs
+++ b/src/ReactiveUI.Tests/Resolvers/DependencyResolverTests.cs
@@ -5,8 +5,6 @@
using FluentAssertions;
-using Xunit;
-
namespace ReactiveUI.Tests
{
public sealed class DependencyResolverTests
diff --git a/src/ReactiveUI.Tests/Resolvers/INPCObservableForPropertyTests.cs b/src/ReactiveUI.Tests/Resolvers/INPCObservableForPropertyTests.cs
index bac967a938..b168c353b9 100644
--- a/src/ReactiveUI.Tests/Resolvers/INPCObservableForPropertyTests.cs
+++ b/src/ReactiveUI.Tests/Resolvers/INPCObservableForPropertyTests.cs
@@ -3,11 +3,8 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.
-using System.ComponentModel;
using System.Runtime.CompilerServices;
-using Xunit;
-
namespace ReactiveUI.Tests
{
public class INPCObservableForPropertyTests
diff --git a/src/ReactiveUI.Tests/Resolvers/PocoObservableForPropertyTests.cs b/src/ReactiveUI.Tests/Resolvers/PocoObservableForPropertyTests.cs
index 00a2745b54..4278e31ab4 100644
--- a/src/ReactiveUI.Tests/Resolvers/PocoObservableForPropertyTests.cs
+++ b/src/ReactiveUI.Tests/Resolvers/PocoObservableForPropertyTests.cs
@@ -3,10 +3,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.
-using System.ComponentModel;
-
-using Xunit;
-
namespace ReactiveUI.Tests
{
public class PocoObservableForPropertyTests
diff --git a/src/ReactiveUI.Tests/Routing/RoutableViewModelMixinTests.cs b/src/ReactiveUI.Tests/Routing/RoutableViewModelMixinTests.cs
index 383b2cc000..1f7410f70d 100644
--- a/src/ReactiveUI.Tests/Routing/RoutableViewModelMixinTests.cs
+++ b/src/ReactiveUI.Tests/Routing/RoutableViewModelMixinTests.cs
@@ -3,8 +3,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.
-using Xunit;
-
namespace ReactiveUI.Tests
{
///
diff --git a/src/ReactiveUI.Tests/Routing/RoutedViewHostTests.cs b/src/ReactiveUI.Tests/Routing/RoutedViewHostTests.cs
index 287a8fd972..7d8365a5b7 100644
--- a/src/ReactiveUI.Tests/Routing/RoutedViewHostTests.cs
+++ b/src/ReactiveUI.Tests/Routing/RoutedViewHostTests.cs
@@ -9,8 +9,6 @@
using ReactiveUI.Tests.Wpf;
-using Xunit;
-
namespace ReactiveUI.Tests
{
public class RoutedViewHostTests
diff --git a/src/ReactiveUI.Tests/Routing/RoutingStateTests.cs b/src/ReactiveUI.Tests/Routing/RoutingStateTests.cs
index c45a4d12a5..59eacfa1d0 100644
--- a/src/ReactiveUI.Tests/Routing/RoutingStateTests.cs
+++ b/src/ReactiveUI.Tests/Routing/RoutingStateTests.cs
@@ -9,8 +9,6 @@
using ReactiveUI.Testing;
-using Xunit;
-
namespace ReactiveUI.Tests
{
public class RoutingStateTests
diff --git a/src/ReactiveUI.Tests/Routing/ViewModelViewHostTests.cs b/src/ReactiveUI.Tests/Routing/ViewModelViewHostTests.cs
index 26d0dd5d91..63313ed4c4 100644
--- a/src/ReactiveUI.Tests/Routing/ViewModelViewHostTests.cs
+++ b/src/ReactiveUI.Tests/Routing/ViewModelViewHostTests.cs
@@ -9,8 +9,6 @@
using ReactiveUI.Tests.Wpf;
-using Xunit;
-
namespace ReactiveUI.Tests
{
public class ViewModelViewHostTests
diff --git a/src/ReactiveUI.Tests/RxAppTest.cs b/src/ReactiveUI.Tests/RxAppTest.cs
index 916d3f6e67..cd98c473c8 100644
--- a/src/ReactiveUI.Tests/RxAppTest.cs
+++ b/src/ReactiveUI.Tests/RxAppTest.cs
@@ -5,8 +5,6 @@
using System.Diagnostics;
-using Xunit;
-
namespace ReactiveUI.Tests
{
///
diff --git a/src/ReactiveUI.Tests/Suspension/SuspensionHostExtensionsTests.cs b/src/ReactiveUI.Tests/Suspension/SuspensionHostExtensionsTests.cs
index aa526b46c7..37e07da4e4 100644
--- a/src/ReactiveUI.Tests/Suspension/SuspensionHostExtensionsTests.cs
+++ b/src/ReactiveUI.Tests/Suspension/SuspensionHostExtensionsTests.cs
@@ -5,8 +5,6 @@
using FluentAssertions;
-using Xunit;
-
namespace ReactiveUI.Tests.Suspension
{
public class SuspensionHostExtensionsTests
diff --git a/src/ReactiveUI.Tests/TestConfiguration.cs b/src/ReactiveUI.Tests/TestConfiguration.cs
index 1dbd8303d7..cf7f8128a3 100644
--- a/src/ReactiveUI.Tests/TestConfiguration.cs
+++ b/src/ReactiveUI.Tests/TestConfiguration.cs
@@ -3,6 +3,4 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.
-using Xunit;
-
[assembly: CollectionBehavior(DisableTestParallelization = true, MaxParallelThreads = 1)]
diff --git a/src/ReactiveUI.Tests/Utilities/ApiApprovalBase.cs b/src/ReactiveUI.Tests/Utilities/ApiApprovalBase.cs
index e85eb428f4..f491a7d25a 100644
--- a/src/ReactiveUI.Tests/Utilities/ApiApprovalBase.cs
+++ b/src/ReactiveUI.Tests/Utilities/ApiApprovalBase.cs
@@ -3,7 +3,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.
-using System.Diagnostics.CodeAnalysis;
using System.Reflection;
using System.Runtime.CompilerServices;
diff --git a/src/ReactiveUI.Tests/Utilities/EnumerableTestMixin.cs b/src/ReactiveUI.Tests/Utilities/EnumerableTestMixin.cs
index e0a1a10805..ca5610fb91 100644
--- a/src/ReactiveUI.Tests/Utilities/EnumerableTestMixin.cs
+++ b/src/ReactiveUI.Tests/Utilities/EnumerableTestMixin.cs
@@ -5,8 +5,6 @@
using System.Diagnostics;
-using Xunit;
-
namespace ReactiveUI.Tests
{
public static class EnumerableTestMixin
diff --git a/src/ReactiveUI.Tests/Utilities/TestLogger.cs b/src/ReactiveUI.Tests/Utilities/TestLogger.cs
index 0729737395..2e29992aca 100644
--- a/src/ReactiveUI.Tests/Utilities/TestLogger.cs
+++ b/src/ReactiveUI.Tests/Utilities/TestLogger.cs
@@ -3,8 +3,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.
-using System.ComponentModel;
-
namespace ReactiveUI.Tests
{
public class TestLogger : ILogger
diff --git a/src/ReactiveUI.Tests/WaitForDispatcherSchedulerTests.cs b/src/ReactiveUI.Tests/WaitForDispatcherSchedulerTests.cs
index b72c091145..d5f12f0b5d 100644
--- a/src/ReactiveUI.Tests/WaitForDispatcherSchedulerTests.cs
+++ b/src/ReactiveUI.Tests/WaitForDispatcherSchedulerTests.cs
@@ -3,8 +3,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.
-using Xunit;
-
namespace ReactiveUI.Tests
{
///
diff --git a/src/ReactiveUI.Tests/WhenAny/Mockups/NonReactiveINPCObject.cs b/src/ReactiveUI.Tests/WhenAny/Mockups/NonReactiveINPCObject.cs
index ddc5af41a2..fdf87ea088 100644
--- a/src/ReactiveUI.Tests/WhenAny/Mockups/NonReactiveINPCObject.cs
+++ b/src/ReactiveUI.Tests/WhenAny/Mockups/NonReactiveINPCObject.cs
@@ -3,8 +3,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.
-using System.ComponentModel;
-
namespace ReactiveUI.Tests
{
public class NonReactiveINPCObject : INotifyPropertyChanged
diff --git a/src/ReactiveUI.Tests/WhenAny/ReactiveNotifyPropertyChangedMixinTest.cs b/src/ReactiveUI.Tests/WhenAny/ReactiveNotifyPropertyChangedMixinTest.cs
index af7774ce17..967953581f 100644
--- a/src/ReactiveUI.Tests/WhenAny/ReactiveNotifyPropertyChangedMixinTest.cs
+++ b/src/ReactiveUI.Tests/WhenAny/ReactiveNotifyPropertyChangedMixinTest.cs
@@ -9,8 +9,6 @@
using ReactiveUI.Testing;
-using Xunit;
-
namespace ReactiveUI.Tests
{
///
diff --git a/src/ReactiveUI.Tests/WhenAny/WhenAnyObservableTests.cs b/src/ReactiveUI.Tests/WhenAny/WhenAnyObservableTests.cs
index e367a39089..9e0b09389c 100644
--- a/src/ReactiveUI.Tests/WhenAny/WhenAnyObservableTests.cs
+++ b/src/ReactiveUI.Tests/WhenAny/WhenAnyObservableTests.cs
@@ -6,8 +6,6 @@
using DynamicData;
using DynamicData.Binding;
-using Xunit;
-
namespace ReactiveUI.Tests
{
///
diff --git a/src/ReactiveUI.WinUI/GlobalUsings.cs b/src/ReactiveUI.WinUI/GlobalUsings.cs
new file mode 100644
index 0000000000..a0f4dbb84c
--- /dev/null
+++ b/src/ReactiveUI.WinUI/GlobalUsings.cs
@@ -0,0 +1,13 @@
+// Copyright (c) 2023 .NET Foundation and Contributors. All rights reserved.
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for full license information.
+
+global using global::Splat;
+global using global::System;
+global using global::System.Linq;
+global using global::System.Linq.Expressions;
+global using global::System.Reactive.Concurrency;
+global using global::System.Reactive.Disposables;
+global using global::System.Reactive.Linq;
+global using global::System.Threading;
diff --git a/src/ReactiveUI.Winforms/ActivationForViewFetcher.cs b/src/ReactiveUI.Winforms/ActivationForViewFetcher.cs
index af42849463..c0bf2df220 100644
--- a/src/ReactiveUI.Winforms/ActivationForViewFetcher.cs
+++ b/src/ReactiveUI.Winforms/ActivationForViewFetcher.cs
@@ -3,7 +3,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.
-using System.ComponentModel;
using System.Globalization;
using System.Reflection;
using System.Windows.Forms;
diff --git a/src/ReactiveUI.Winforms/CreatesWinformsCommandBinding.cs b/src/ReactiveUI.Winforms/CreatesWinformsCommandBinding.cs
index 522dd51706..939e810131 100644
--- a/src/ReactiveUI.Winforms/CreatesWinformsCommandBinding.cs
+++ b/src/ReactiveUI.Winforms/CreatesWinformsCommandBinding.cs
@@ -3,7 +3,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.
-using System.ComponentModel;
using System.Reflection;
using System.Windows.Forms;
using System.Windows.Input;
diff --git a/src/ReactiveUI.Winforms/GlobalUsings.cs b/src/ReactiveUI.Winforms/GlobalUsings.cs
new file mode 100644
index 0000000000..f8660afa42
--- /dev/null
+++ b/src/ReactiveUI.Winforms/GlobalUsings.cs
@@ -0,0 +1,15 @@
+// Copyright (c) 2023 .NET Foundation and Contributors. All rights reserved.
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for full license information.
+
+global using global::Splat;
+global using global::System;
+global using global::System.Collections.Generic;
+global using global::System.ComponentModel;
+global using global::System.Linq;
+global using global::System.Linq.Expressions;
+global using global::System.Reactive.Concurrency;
+global using global::System.Reactive.Disposables;
+global using global::System.Reactive.Linq;
+global using global::System.Threading;
diff --git a/src/ReactiveUI.Winforms/ObservableCollectionChangedToListChangedTransformer.cs b/src/ReactiveUI.Winforms/ObservableCollectionChangedToListChangedTransformer.cs
index b1c9265f49..aacf0b1efc 100644
--- a/src/ReactiveUI.Winforms/ObservableCollectionChangedToListChangedTransformer.cs
+++ b/src/ReactiveUI.Winforms/ObservableCollectionChangedToListChangedTransformer.cs
@@ -4,7 +4,6 @@
// See the LICENSE file in the project root for full license information.
using System.Collections.Specialized;
-using System.ComponentModel;
namespace ReactiveUI.Winforms;
diff --git a/src/ReactiveUI.Winforms/ReactiveUserControl.cs b/src/ReactiveUI.Winforms/ReactiveUserControl.cs
index f8cf26786f..243ecd2cd3 100644
--- a/src/ReactiveUI.Winforms/ReactiveUserControl.cs
+++ b/src/ReactiveUI.Winforms/ReactiveUserControl.cs
@@ -3,7 +3,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.
-using System.ComponentModel;
using System.Windows.Forms;
namespace ReactiveUI.Winforms;
diff --git a/src/ReactiveUI.Winforms/RoutedViewHost.cs b/src/ReactiveUI.Winforms/RoutedViewHost.cs
index affb3ef044..1668bec1d0 100644
--- a/src/ReactiveUI.Winforms/RoutedViewHost.cs
+++ b/src/ReactiveUI.Winforms/RoutedViewHost.cs
@@ -3,7 +3,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.
-using System.ComponentModel;
using System.Windows.Forms;
namespace ReactiveUI.Winforms;
diff --git a/src/ReactiveUI.Winforms/ViewModelViewHost.cs b/src/ReactiveUI.Winforms/ViewModelViewHost.cs
index 4f471dea0c..7e0d5ba66b 100644
--- a/src/ReactiveUI.Winforms/ViewModelViewHost.cs
+++ b/src/ReactiveUI.Winforms/ViewModelViewHost.cs
@@ -3,7 +3,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.
-using System.ComponentModel;
using System.Windows.Forms;
namespace ReactiveUI.Winforms;
diff --git a/src/ReactiveUI.Winforms/WinformsCreatesObservableForProperty.cs b/src/ReactiveUI.Winforms/WinformsCreatesObservableForProperty.cs
index 3313fd4710..2aee6bc4c2 100644
--- a/src/ReactiveUI.Winforms/WinformsCreatesObservableForProperty.cs
+++ b/src/ReactiveUI.Winforms/WinformsCreatesObservableForProperty.cs
@@ -3,7 +3,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.
-using System.ComponentModel;
using System.Reflection;
namespace ReactiveUI.Winforms;
diff --git a/src/ReactiveUI.Wpf/DependencyObjectObservableForProperty.cs b/src/ReactiveUI.Wpf/DependencyObjectObservableForProperty.cs
index 954bb1a138..068c5220d9 100644
--- a/src/ReactiveUI.Wpf/DependencyObjectObservableForProperty.cs
+++ b/src/ReactiveUI.Wpf/DependencyObjectObservableForProperty.cs
@@ -3,7 +3,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.
-using System.ComponentModel;
using System.Reflection;
using System.Windows;
diff --git a/src/ReactiveUI.Wpf/GlobalUsings.cs b/src/ReactiveUI.Wpf/GlobalUsings.cs
new file mode 100644
index 0000000000..823557dff8
--- /dev/null
+++ b/src/ReactiveUI.Wpf/GlobalUsings.cs
@@ -0,0 +1,16 @@
+// Copyright (c) 2023 .NET Foundation and Contributors. All rights reserved.
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for full license information.
+
+global using global::Splat;
+global using global::System;
+global using global::System.Collections.Generic;
+global using global::System.ComponentModel;
+global using global::System.Linq;
+global using global::System.Reactive;
+global using global::System.Reactive.Concurrency;
+global using global::System.Reactive.Disposables;
+global using global::System.Reactive.Linq;
+global using global::System.Reactive.Subjects;
+global using global::System.Threading;
diff --git a/src/ReactiveUI.Wpf/ReactiveUI.Wpf.csproj b/src/ReactiveUI.Wpf/ReactiveUI.Wpf.csproj
index 047da01da2..0b0221070d 100644
--- a/src/ReactiveUI.Wpf/ReactiveUI.Wpf.csproj
+++ b/src/ReactiveUI.Wpf/ReactiveUI.Wpf.csproj
@@ -9,7 +9,6 @@
ReactiveUI.WPF
true
mvvm;reactiveui;rx;reactive extensions;observable;LINQ;events;frp;wpf;net;net472
- True
diff --git a/src/ReactiveUI.XamForms.Tests/Activation/Mocks/FlyoutPageViewFlyout.xaml.cs b/src/ReactiveUI.XamForms.Tests/Activation/Mocks/FlyoutPageViewFlyout.xaml.cs
index c6a8efcf81..13b2d7500c 100644
--- a/src/ReactiveUI.XamForms.Tests/Activation/Mocks/FlyoutPageViewFlyout.xaml.cs
+++ b/src/ReactiveUI.XamForms.Tests/Activation/Mocks/FlyoutPageViewFlyout.xaml.cs
@@ -4,7 +4,6 @@
// See the LICENSE file in the project root for full license information.
using System.Collections.ObjectModel;
-using System.ComponentModel;
using System.Runtime.CompilerServices;
using Xamarin.Forms;
using Xamarin.Forms.Xaml;
diff --git a/src/ReactiveUI.XamForms.Tests/GlobalUsings.cs b/src/ReactiveUI.XamForms.Tests/GlobalUsings.cs
new file mode 100644
index 0000000000..86793f4315
--- /dev/null
+++ b/src/ReactiveUI.XamForms.Tests/GlobalUsings.cs
@@ -0,0 +1,11 @@
+// Copyright (c) 2023 .NET Foundation and Contributors. All rights reserved.
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for full license information.
+
+global using global::Splat;
+global using global::System;
+global using global::System.ComponentModel;
+global using global::System.Reactive.Disposables;
+global using global::System.Reactive.Linq;
+global using global::System.Threading.Tasks;
diff --git a/src/ReactiveUI.XamForms/ActivationForViewFetcher.cs b/src/ReactiveUI.XamForms/ActivationForViewFetcher.cs
index 8a1bf9cbc3..7adcf7ea43 100644
--- a/src/ReactiveUI.XamForms/ActivationForViewFetcher.cs
+++ b/src/ReactiveUI.XamForms/ActivationForViewFetcher.cs
@@ -3,7 +3,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.
-using System.ComponentModel;
using System.Reflection;
using Xamarin.Forms;
diff --git a/src/ReactiveUI.XamForms/GlobalUsings.cs b/src/ReactiveUI.XamForms/GlobalUsings.cs
new file mode 100644
index 0000000000..2634ebb164
--- /dev/null
+++ b/src/ReactiveUI.XamForms/GlobalUsings.cs
@@ -0,0 +1,15 @@
+// Copyright (c) 2023 .NET Foundation and Contributors. All rights reserved.
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for full license information.
+
+global using global::Splat;
+global using global::System;
+global using global::System.ComponentModel;
+global using global::System.Diagnostics.CodeAnalysis;
+global using global::System.Linq;
+global using global::System.Reactive;
+global using global::System.Reactive.Disposables;
+global using global::System.Reactive.Linq;
+global using global::System.Reactive.Subjects;
+global using global::System.Reactive.Threading.Tasks;
diff --git a/src/ReactiveUI.XamForms/RoutedViewHost.cs b/src/ReactiveUI.XamForms/RoutedViewHost.cs
index fe543862fe..793272ec40 100644
--- a/src/ReactiveUI.XamForms/RoutedViewHost.cs
+++ b/src/ReactiveUI.XamForms/RoutedViewHost.cs
@@ -3,7 +3,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.
-using System.Diagnostics.CodeAnalysis;
using System.Reflection;
using Xamarin.Forms;
diff --git a/src/ReactiveUI/GlobalUsings.cs b/src/ReactiveUI/GlobalUsings.cs
new file mode 100644
index 0000000000..d90ce2e7f5
--- /dev/null
+++ b/src/ReactiveUI/GlobalUsings.cs
@@ -0,0 +1,20 @@
+// Copyright (c) 2023 .NET Foundation and Contributors. All rights reserved.
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for full license information.
+
+global using global::Splat;
+global using global::System;
+global using global::System.Collections.Generic;
+global using global::System.ComponentModel;
+global using global::System.Diagnostics.CodeAnalysis;
+global using global::System.Linq;
+global using global::System.Linq.Expressions;
+global using global::System.Reactive;
+global using global::System.Reactive.Concurrency;
+global using global::System.Reactive.Disposables;
+global using global::System.Reactive.Linq;
+global using global::System.Reactive.Subjects;
+global using global::System.Reactive.Threading.Tasks;
+global using global::System.Threading;
+global using global::System.Threading.Tasks;
diff --git a/src/global.json b/src/global.json
index 781c465e62..d0516b067e 100644
--- a/src/global.json
+++ b/src/global.json
@@ -1,6 +1,6 @@
{
"sdk": {
- "version": "7.0",
+ "version": "7.0.400",
"rollForward": "latestMinor",
"allowPrerelease": true
},