Asp.net core .Net 5 compatibility?
See original GitHub issueDescribe your question
Hello. I am using the Mqtt server with the AspNetCore integration and trying to upgrade to .Net 5 (RC2). Sadly I get a compile error after upgrading to the latest Mqtt + .Net5 RC2 packages.
The error is: CS7069 Reference to type ‘ConnectionsRouteBuilder’ claims it is defined in ‘Microsoft.AspNetCore.Http.Connections’, but it could not be found.
I found out that the type ConnectionsRouterBuilder is removed with .Net 5 hence the error.
The actual question: Is .Net 5 compatibility in work or is it planned? And if so will it be shipped before the .Net 5 release next month?
Thanks in advance
Which project is your question related to?
- Server (AspNetCore integration)
Edit:
The method in question is
app.UseEndpoints(endpoints =>
{
endpoints.MapMqtt("/mqtt");
});
Issue Analytics
- State:
- Created 3 years ago
- Comments:15 (3 by maintainers)
Top Results From Across the Web
Breaking changes in .NET 5
Source compatible - Source code will compile successfully without changes when targeting the new runtime or using the new SDK or component.
Read more >.NET and .NET Core official support policy
Support for ASP.NET Core 2.1 on .NET Framework matches the ASP.NET Support policy for other package-based ASP.NET frameworks. The complete list of packages ......
Read more >Compatibility for ASP.NET Core
Compatibility ;.NET 5, and .NET 6; Platform-specific versions of .NET 6 for Android, iOS, and MacCatalyst .NET Core 3.0 ; Mono 5.4 and...
Read more >How to get a .NET core 3.1 Project work with .NET 5.0 project
NET 5 does not ensure backwards compatibility. Microsoft provides information on compatibility and breaking changes here. .NET 5 merges together ...
Read more >Five Things You Should Know About .NET 5
NET Core doesn't support Web Forms, so the fact it is no longer supported in .NET 5 shouldn't actually be news. However, you...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Hi, maybe this is helpful for someone. Using the solution from @Jossec101 we still had a problem with the “Sec-WebSocket-Protocol”.
WebSocket connection to '...' failed: Error during WebSocket handshake: Sent non-empty 'Sec-WebSocket-Protocol' header but no response was receivedTo fix that we had to specify a SubProtocolSelector, like this:
builder.MapConnectionHandler<MqttConnectionHandler>("/api-gateway", httpConnectionDispatcherOptions => httpConnectionDispatcherOptions.WebSockets.SubProtocolSelector = protocolList => protocolList.FirstOrDefault() ?? string.Empty);@sean-mcl I have changed the example and it should work now.