I am trying to use DispatcherScheduler.Current in an example WPF app, the following line does not resolve the class (static).
Does anyone know why this not resolve?
public partial class App : Application
{
public App()
{
**var tmp = DispatcherScheduler.Current;**
}
}
The csproj file:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net5.0-windows</TargetFramework>
<UseWPF>true</UseWPF>
<Platforms>AnyCPU;x64</Platforms>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="System.Reactive" Version="5.0.0" />
</ItemGroup>
</Project>
The following support issue on GitHub suggest this should work - here
OS: Mircosoft Windows 10 Pro, Version: 10.0.19042