将 signalr 客户端与 xamarin 表单一起使用

using signalr client with xamarin forms

我正在尝试在 Xamarin 表单(在 .net 标准 2.0 上)上安装 Microsoft.AspNetCore.SignalR.Client 和 运行 android 应用程序。我一直收到错误

Could not load assembly 'System.Threading.Tasks.Extensions' during startup registration

我已经尝试安装 System.Threading.Tasks.Extensions nuget 的最新预发布版,我仍然遇到同样的错误。我没有在网上找到任何其他人遇到此问题。

您需要 Visual Studio 2017 更新 15.8 + Microsoft.AspNetCore.SignalR.Client Package with at least Version 1.0.1

ASP.NET Core 2.1.1 contains fixes to resolve blocking issues when using the SignalR Client from Xamarin. However, these fixes also require an updated build of Xamarin.iOS and Xamarin.Android, as well as some additional dependencies.

In order to use the SignalR Client in Xamarin applications you will need to:

Upgrade Microsoft.AspNetCore.SignalR.Client to 1.0.1. 
Upgrade Xamarin to the appropriate version:
    Xamarin.Android 8.4.0.1

VS2017 更新 15.8 附带 Xamarin.Android9.0.x 工具,其中包含针对该问题的修复。