'Method not found: Microsoft.AspNetCore.Connections.BaseConnectionContext.get_Features()
I have an ASP.NET Core 5.0 Web API used with an angular Web client. I'm using SignalR and it works fine.
Now I want to use a SignalR client to communicate with a third party service. So I installed the Microsoft.AspNetCore.SignalR.Client nuget.
As soon as I start the Web API, and even without instanciating a SignalR client, I have the following error:
System.MissingMethodException: Method not found: 'Microsoft.AspNetCore.Http.Features.IFeatureCollection Microsoft.AspNetCore.Connections.BaseConnectionContext.get_Features()'.
at Microsoft.AspNetCore.Http.Connections.Internal.HttpConnectionContext..ctor(String connectionId, String connectionToken, ILogger logger)
at Microsoft.AspNetCore.Http.Connections.Internal.HttpConnectionManager.CreateConnection(PipeOptions transportPipeOptions, PipeOptions appPipeOptions, Int32 negotiateVersion)
at Microsoft.AspNetCore.Http.Connections.Internal.HttpConnectionDispatcher.CreateConnection(HttpConnectionDispatcherOptions options, Int32 clientProtocolVersion)
at Microsoft.AspNetCore.Http.Connections.Internal.HttpConnectionDispatcher.ProcessNegotiate(HttpContext context, HttpConnectionDispatcherOptions options, ConnectionLogScope logScope)
at Microsoft.AspNetCore.Http.Connections.Internal.HttpConnectionDispatcher.ExecuteNegotiateAsync(HttpContext context, HttpConnectionDispatcherOptions options)
at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)
at Microsoft.AspNetCore.Builder.RouterMiddleware.Invoke(HttpContext httpContext)
at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Localization.RequestLocalizationMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Session.SessionMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Session.SessionMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)
I understand the error message, but not why adding a NuGet replaced a core server component. How can I solve this problem?
Solution 1:[1]
The fix in my case was I had to update all .NET libraries from 5.0.12 to the latest 5.0.15.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Vangi |
