Skip to content

Upgrading ReactiveUI

ReactiveUI has been going through rapid changes since version 7.

Here are some guides on how to upgrade to newer features.

Supported Target Frameworks

ReactiveUI targets .NET 8.0, .NET 9.0, .NET 10.0 on every supported platform, and .NET Framework 4.6.2 – 4.8.1 on Windows. The .NET Framework binaries are published as net462, net472, and net481 and run on every release in that range — i.e. net462, net47, net471, net472, net48, and net481 apps all work (NuGet picks the closest matching TFM at restore time, and .NET Framework's runtime forward-compat does the rest). Support for .NET Standard (and other older targets) has been dropped — utility libraries that depend on ReactiveUI should multi-target the supported moniker(s) they need.

<PropertyGroup>
  <TargetFrameworks>net8.0;net9.0;net10.0;net462;net472;net481</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
  <PackageReference Include="ReactiveUI" Version="*" />
</ItemGroup>

Use PackageReference NuGet

Older projects need to upgrade from packages.config to the newer PackageReference format. This is because we rely on SemVer 2.0 features in our packages.

Follow the Upgrade Guide on how to upgrade.

If you have any packages that rely on System.Reactive less than v4, make sure you include a PackageReference to System.Reactive.Compatibility.

A tip in the new PackageReference you no longer have to include dependencies such as System.Reactive unless you want to deliberately upgrade to a newer version then we have set. We recommend only including ReactiveUI and Platform Packages.

TIP: if the upgrade option does not show when right clicking on the packages.config file, make sure that PackageReference are your default choice under Tools -> Options -> NuGet Package Manager -> General, You can change the "Default package management format" to "PackageReference".

Use the platform ReactiveUI NuGet packages for WinForms, WPF, WinUI, MAUI, Avalonia, Uno Platform, etc

We had to introduce a number of new NuGet packages for various platforms. This is because Visual Studio for Mac would be looking for Windows only symbols if we didn't exclude them from the main package.

See Platform Package for more details.

NOTE: The Event packages also are separated for some platforms also.

Use subscribe with ReactiveCommand.Execute()

ReactiveCommand<TParam, TReturn>.Execute() is now a IObservable. As such it is now lazy evaluated and won't trigger until you Subscribe().

Before:

someCommand.Execute();

After:

someCommand.Execute(Unit.Default).Subscribe();

Use Interactions instead of UserError

UserError were replaced by a much more generic mechanism called Interactions.

Use DynamicData instead of ReactiveList

ReactiveList was starting to get rather buggy and a maintenance issue for maintainers.

We decided to recommend DynamicData as many of the maintainers were already using that library.