无服务器 Azure SignalR 服务和 .NetFramework 4.7.1Unity 应用程序

问题描述

是否可以从 .NetFramework 4.7.1 (Unity) 应用程序中侦听来自无服务器 Azure SignalR 服务的事件?

我已经实施了适用于 javascript 客户端和 .net Core 3.1 客户端的解决方案,但无法让 .NetFramework 4.7.1(Unity 应用程序)客户端工作。我正在尝试使用与 .Net Core 3.1 客户端相同的库。即:“Microsoft.AspNetCore.SignalR.Client”版本 5.0.2 及其依赖项。但是我从库中收到了不同类型的错误

当我缺少 System.Text.Json 等依赖项时,出现错误

Unloading broken assembly Assets/Plugins/Microsoft.AspNetCore.SignalR.Common.dll,this assembly can cause crashes in the runtime

当我添加依赖项时,错误是:

TypeLoadException: Could not resolve type with token 01000066 (from typeref,class/assembly System.Text.Json.Serialization.JsonIgnoreCondition,System.Text.Json,Version=5.0.0.1,Culture=neutral,PublicKeyToken=cc7b13ffcd2ddd51)
Microsoft.AspNetCore.SignalR.JsonHubProtocolOptions..ctor () (at <c72a5d3426db4d1989e41390e5494e1a>:0)

它应该像那样工作,还是我把头撞到石头上。我不熟悉 C# 库/运行时的东西。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)