Recently I tried to import SignalR dlls into a Unity project (support for .NET Standard 2.0). The NuGet package -> Microsoft.AspNetCore.SignalR.Client is currently at version 3.1.2. Here are the dependencies listed:
.NETStandard,Version=v2.0
Microsoft.AspNetCore.Http.Connections.Client
(>= 3.1.2) Microsoft.AspNetCore.SignalR.Client.Core (>= 3.1.2)
However, when I move these dlls into the Unity project, I'm greeted with an error:
Error CS1705 Assembly 'Microsoft.AspNetCore.SignalR.Client.Core' with identity 'Microsoft.AspNetCore.SignalR.Client.Core, Version=3.1.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' uses 'netstandard, Version=2.1.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' which has a higher version than referenced assembly 'netstandard' with identity 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'
That makes sense to me, as I don't expect Unity to support Version 2.1 (the table at the .NET Standard docs states that 2.0 is the latest for Unity. I'm able to downgrade the package to Version 1.1, and everything works as expected (at least this error disappears). I determined which version of SignalR.Client to choose by going through each version, installing/copying until the errors disappeared.
The dependencies for 1.1.0 are identical (exception the Core and Client packages are now listed as (>=1.1.0)
instead of (>= 3.1.2)
.
Question: Is there a "better" way than guess-and-check to figure out which version of .NET Standard is required, maybe a spec somewhere that shows which version of .NET Standard needs to be supported for a package to be used?