Tôi dường như không nhận được SignalR 3 hoạt động trên ASP .Net 5 RC-1 nâng cấp từ Beta8. Tôi đã thử gói RC1 mới nhất cho SignalR nhưng có vấn đề sau đây. Tôi đã thử các gói "Microsoft.AspNet.SignalR.Server": "3.0.0-rc1-15810"
SignalR không hoạt động trong ASP .Net 5 RC-1
services.AddSignalR();
đang gây ra các lỗi sau:
The type 'IServiceCollection' is defined in an assembly that is not referenced. You must add a reference to assembly 'Microsoft.Extensions.DependencyInjection.Abstractions, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
và app.UseSignalR();
gây ra điều này một:
The type 'IApplicationBuilder' is defined in an assembly that is not referenced. You must add a reference to assembly 'Microsoft.AspNet.Http.Abstractions, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
Khi tôi chuyển sang gói "Microsoft.AspNet.SignalR.Server": "3.0.0-rc2-15909"
Tôi gặp lỗi thời gian chạy:
An exception of type 'System.TypeLoadException' occurred in mscorlib.dll but was not handled in user code
Additional information: Could not load type 'Microsoft.AspNet.Http.RequestDelegate' from assembly 'Microsoft.AspNet.Http.Abstractions, Version=1.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'.
SignalR không được hỗ trợ cho ASP .Net 5 v1. – Tratcher
@Tratcher về [this] (https://github.com/aspnet/SignalR-Server). Ngoài ra có vẻ như [this] (https://github.com/aspnet/BugTracker) đang sử dụng nó. –
@Truy cập nó chắc chắn được hỗ trợ. Các câu trả lời bên dưới đã hiệu quả với tôi và tôi đã sử dụng nó với beta 8 trong vài tuần qua. – Tjaart