I am building a Tizen App (.NET Tizen 4.0) using .NET Core and Xamarin (https://docs.tizen.org/application/dotnet/).
Everything works perfectly fine, except for one thing. It is impossible to start an SignalR (Microsoft.AspNetCore.SignalR.Client (5.0.7)) connection to a hub. As soon as I create a new HubConnectionBuilder the following exception gets thrown:
System.IO.FileLoadException: Could not load file or assembly 'System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
The weirdest part about this. This exception changes without me doing anything. If I grab a drink for example, come back and run it again a different assembly is missing. For now I saw either System.Threading.Tasks.Extensions, Version=4.2.0.1 or Microsoft.Extensions.DependencyInjection.Abstractions, Version=5.0.0 missing. To top it off: I do not use either of those packages actively.
So basically, as soon as I remove the following line of code, everything works fine.
this.hub = new HubConnectionBuilder().WithUrl($"wss://{Settings.Instance.ServerAddress}/deviceHub").Build();
I already tried to add the missing packages, but without success. The thing is, the packages, for some super strange reason, cannot be found in the SignalR.Client package (just my guess). I also tried removing SignalR.Client, Rebuilding the Project, Uninstalling Tizen from Visual Studio, Update all my packages and even uninstalled Visual Studio. I literally wasted my last 3 days on this without any progress. Maybe someone has a solution to this, or some sort of workaround.