Today I upgraded a large effort of mine to .Net5.0 Preview 6 and immediately ran into a compatibility issue that I have a hunch might be related to WinRT being removed from the .Net runtime. Below you will see the package versions I am using along with a stack trace caused by a missing System.Runtime.InteropServices.WindowsRuntime Version=4.0.3.0. What timeframe could one expect to see a compatible version of these libraries released by?
<PackageReference Include="System.Reactive" Version="4.4.1" />
<PackageReference Include="System.Reactive.Linq" Version="4.4.1" />
System.IO.FileNotFoundException: Could not load file or assembly 'System.Runtime.InteropServices.WindowsRuntime, Version=4.0.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified.
File name: 'System.Runtime.InteropServices.WindowsRuntime, Version=4.0.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
at System.Reactive.ReflectionUtils.GetEventMethods[TSender,TEventArgs](Type targetType, Object target, String eventName, MethodInfo& addMethod, MethodInfo& removeMethod, Type& delegateType, Boolean& isWinRT)
at System.Reactive.Linq.QueryLanguage.FromEventPattern_[TSender,TEventArgs,TResult](Type targetType, Object target, String eventName, Func`3 getResult, IScheduler scheduler) in /_/Rx.NET/Source/src/System.Reactive/Linq/QueryLanguage.Events.cs:line 263
at System.Reactive.Linq.QueryLanguage.FromEventPattern_[TEventArgs](Object target, String eventName, IScheduler scheduler) in /_/Rx.NET/Source/src/System.Reactive/Linq/QueryLanguage.Events.cs:line 172
at System.Reactive.Linq.QueryLanguage.FromEventPattern[TEventArgs](Object target, String eventName) in /_/Rx.NET/Source/src/System.Reactive/Linq/QueryLanguage.Events.cs:line 160
at System.Reactive.Linq.Observable.FromEventPattern[TEventArgs](Object target, String eventName) in /_/Rx.NET/Source/src/System.Reactive/Linq/Observable.Events.cs:line 648
Hello,
Here are some leads that were found related to the issue:
Similar issue impacted RX too in dotnet/runtime
https://github.com/dotnet/runtime/issues/37638
Someone linked that to this change:
https://github.com/dotnet/runtime/issues/37672
with reference to these docs / changes
https://github.com/dotnet/runtime/issues/35318
https://docs.microsoft.com/en-us/windows/uwp/csharp-winrt/
https://github.com/dotnet/docs/issues/18875
I wonder if it's possible to get an intermediate release of dotnet/reactive removing WinRT from the code base during the transition
And re-adding support later on as a minor
I have no idea if this is something possible or not to be honest
We will get an update out that supports .NET 5 out shortly.
Finally someone responded! :)
Correct. We're currently blocked on build pipelines. Working on it.
Please try out https://www.nuget.org/packages/System.Reactive/5.0.0-preview.16 and open specific issues as needed.
Most helpful comment
We will get an update out that supports .NET 5 out shortly.