Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rationale for dropping netstandard2.0 support? #6438

Closed
pardahlman opened this issue Jul 6, 2022 · 4 comments
Closed

Rationale for dropping netstandard2.0 support? #6438

pardahlman opened this issue Jul 6, 2022 · 4 comments

Comments

@pardahlman
Copy link

Looking forward to the next major version of NServiceBus. I was surprised to see that you are dropping support for netstandard2.0 - what is the rational for this? It looks like the change was introduced in this commit 6454809. It was merged #5913 but introduced in (closed) PR #5890.

@DavidBoike
Copy link
Member

NServiceBus 8 will be targeting net472 and net6.0. Is there any platform you were hoping to target with NServiceBus 8 that wouldn’t be supported by those targets?

@pardahlman
Copy link
Author

Well, yes - I do believe that we have one or two legacy systems running net462 and newer services still on net5.

We are moving to net6, but the way dependencies are bundled with the project type (e.g. System.Text.Json in Microsoft.NET.Sdk.Web) in combination with breaking changes in .NET 6 makes it a slower process than just changing target framework and deploy.

Another aspect is the impact of our private, downstream NuGet packages that bundles NServiceBus with application specific customization. These packages can no longer target netstandard2.0.

It feels like a big change in NServiceBus, and I'm surprised that there are no announcements or even clues in issues/PRs as to why this change is made.

@DavidBoike DavidBoike changed the title Rational for dropping netstandard2.0 support? Rationale for dropping netstandard2.0 support? Jul 8, 2022
@DavidBoike
Copy link
Member

You're right, it is a big change. That's why it's a major version, because removing target frameworks is a breaking change. NServiceBus 8 is also still in beta, so a lot of the communication just hasn't happened yet.

But here are some important things to keep in mind:

  • .NET Standard is declining in relevance. See Microsoft's post on the future of .NET Standard which was written almost 2 years ago now, as well as Microsoft's documentation on problems with .NET Standard.
  • In accordance with our support policy we're developing NServiceBus 8 to be supported for the next 5-6 years. Targeting netstandard2.0 would allow the code to run on a bunch of platforms that are already out of support, and that we are not testing. I appreciate that the upgrade from net5.0 to net6.0 isn't a walk in the park (I was part of a group that verified our .NET 6 support) but officially .NET 5 is already out of support (as a non-LTS release) and .NET Core 3.1 will also end in December.
  • .NET Framework doesn't really support netstandard2.0 properly until 4.7.2. (Details are here though it's really in the weeds. The comment here says 4.7.1 would have full netstandard2.0 but that didn't end up happening until 4.7.2.) See the 2nd footnote under the netstandard2.0 support table here which says "While NuGet considers .NET Framework 4.6.1 as supporting .NET Standard 1.5 through 2.0, there are several issues with consuming .NET Standard libraries that were built for those versions from .NET Framework 4.6.1 projects. For .NET Framework projects that need to use such libraries, we recommend that you upgrade the project to target .NET Framework 4.7.2 or higher."
  • NServiceBus is wire compatible, so you don't have to upgrade everything in one go. You can run NServiceBus 7 and NServiceBus 8 endpoints together.

If you have private packages that bundle NServiceBus, then you will definitely need a new version of that to support NServiceBus 8, regardless of target framework. A package like that could target either net472 for only .NET Framework, net6.0 for only .NET, or net472;net6.0 just like NServiceBus does if you still have stuff both on .NET and .NET Framework.

@pardahlman
Copy link
Author

My apologies for a late reply. Thanks for a detailed answer. It was something like this that I expected to find in the documentation but didn't (at the time the question was asked, at least 😅). Closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants