signalr.client - 无服务器 Azure SignalR 服务和 .NetFramework 4.7.1(Unity 应用)
问题描述
是否可以从 .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# 库/运行时的东西。
解决方案
推荐阅读
- php - 在同一台托管主机上包含来自不同网站的 PHP 文件?
- go - 我应该在 hystrix.Do 的 hystrix-go 包的运行参数中使用哪个 ctx?来自上层的 ctx,还是 context.Background()?
- c# - C# 静态隐式运算符可轻松将 T 类型的单个对象转换为新列表
- angular - Angular 2+ 中带有参数的单元测试指令
- oracle - 播放存储在 blob 中的 oracle 数据库中的视频 - Oracle Apex
- hex - Shopee Open Platform API 总是响应“Invalid token”
- elasticsearch - 在 Kibana 中使用 ElasticSearch 查询 DSL 从字段中获取唯一数据
- c++ - 无法使用来自非 QT 应用程序的 TCP 套接字在 QT 中捕获数据
- oracle - 从 Tomcat 7 迁移到 Tomcat 9 后启动 Tomcat 的问题
- bash - 使用 bash 减少输出