Microsoft’s .NET 5 was released on 10 November 2020 and had some major changes compared to .NET Framework. Since then, there have been several releases every year. The most current version, .NET 8, was released on November 14, 2023.
You’ll have to migrate to .NET5+ (.NET 5 to .NET 8) in the near future, and this article will help you prepare for this inevitable migration and avoid the last-minute, unexpected problems that will come up if you procrastinate.
What’s the Big Deal about .NET5+?
.NET is Microsoft’s software framework and development platform. It didn’t develop linearly, going from .NET to .NET Framework versions, to .NET Core branching off. It’s understandably confusing.
.NET5+ is almost a complete reimagining of the old .NET Framework. In fact, .NET5+ is the first major update since the 2016 release of .NET Core. Both .NET Core and Framework were maintained in parallel, allowing you to choose between one or the other, leveraging .NET Standard to make shared libraries between the two.
However, once .NET5+ released, .NET Framework became deprecated. This means you can only use .NET Framework as long as your operating system (for example Windows Server 2019) still supports it. With Microsoft shortening its support lifecycles, your operating system’s end-of-life will come sooner than you may think.
Although the transition from .NET Core to .NET5+ will be less complex than the migration from .NET Framework, there are some concerns to take into consideration, as well as some great new features of .NET 5.
.NET5+: Independence, Resilience, Cross-platform
The official Microsoft Blog explains that .NET5+ includes:
- side-by-side installations
- you can install a new version and not worry about breaking existing apps
- self-contained applications
- applications can embed .NET, so .NET does not need to be on the computer
- not being a component of the Windows operating system
- .NET ships new releases independent of the OS schedule
- (Inedo note: What this means is that new releases and deprecated releases now happen independent of the OS Check out this LTS & EOL info from Microsoft.).
- and many more.
They continue to explain that they also “made .NET Core open source and cross-platform.”
.NET5+ is meant to help you lower risk, more efficiently develop, and by extension increase market share. But all this will require some serious up-front preparation.
Negative Effects of .NET5+: Changes and Deprecations
A big change that started from the release of .NET 5 is that Microsoft intends to release a major version every November, with only an even-numbered .NET version after 5 (6, 8, etc.) containing long-term support (LTS). Because of this, you’ll need to plan for regular updates to your code as part of ongoing maintenance.
Some essential .NET Framework features are being transitioned to end-of-life, requiring you to plan to migrate your applications to newer .NET versions.
ASP.NET Web Forms
|Replacement||✘ No Replacement|
Microsoft recommends ASP.NET Core Blazor or Razor Pages.
|Problem||⚠️Full Rewrite Required|
You’ll have to rewrite your applications from scratch to get away from ASP.NET Web Forms, though this will likely be unnecessary for many years.
Windows Communication Foundation (WCF)
Any application that uses service-oriented architecture/API to connect to other applications or services over a network where the service endpoint is built using WCF.
|Replacement||⚠️Community/ Open-source Alternative|
The open-source community has started creating CoreWCF on GitHub, which offers an option to migrate, but is not a full implementation.
Microsoft recommends gRPC as an alternative to WCF. Visual ReCode significantly simplifies this transition.
|Problem||⚠️Full Rewrite or Community Reliance|
You’ll either have to rewrite your APIs from scratch to convert to the ASP.NET Core Web API, or you need to port your code to CoreWCF and risk losing some features you might need.
Windows Workflow Foundation (WF)
|Impacts||Applications with Workflows|
Any application or service that uses workflow libraries (the tools around building and running workflows).
|Replacement||✘ No Official Replacement|
⚠️Community/ Open-source Alternative
The open-source community is creating CoreWF. It isn’t a full implementation at this time, though their goal is to make it a drop-in replacement.
|Problem||⚠️Full Rewrite or Community Reliance|
You’ll either have to find, learn, and rewrite code from scratch to a third-party, “off-the-shelf” library, or you’ll need to port your code to CoreWF and risk losing some features you might need.
How Will .NET 5 Affect My Organization?
We’ve put together some of the common .NET 5 questions and their answers to help you plan for your migration.
Do we really have to migrate to .NET5+?
Yes, because .NET Framework is now deprecated. It will continue to function as long as the operating system it’s on is supported. (For example, if you have a 2019 server OS that supports Framework, Framework will continue to work until Microsoft stops supporting your 2019 server.) You cannot count on the next version of your OS will allow you to install Framework (or whatever older version of .NET you want to install). Or if you can do it, it might require some serious acrobatics to get it to work at all.
However, migration from .NET Core to .NET5+ will present fewer problems. This should begin as soon as possible as Microsoft ended support for .NET Core around December 2022.
In short, the transition is inevitable, but older applications can remain on .NET Framework indefinitely.
What will it cost us to migrate to .NET5+?
It will cost you time and effort, not money, Microsoft won’t charge you to upgrade, but you’ll definitely be spending company time/people hours on it. The amount of effort will depend entirely on the different versions of .NET your applications use.
At this time, there aren’t formal consulting services available for .NET5+ migration help, but these may become available as the majority of companies begin the transition. There is word of a Microsoft .NET Upgrade Assistant, but it’s still in preview mode.
How are .NET5+ applications deployed (versus .NET Framework)?
They are virtually the same, except for web applications. The current .NET5+ implementation requires a module to be installed into IIS (if you’re using IIS), but in the future, it’s expected Microsoft will change this dependency. Microsoft has made no announcements or statements about IIS at this time, however.
The day-to-day of your pipelines will change very little, but your build (continuous integration) will need to change. Most .NET Framework code is compiled using a command-line tool (CLI) called MSBuild. With .NET5+, you’ll be using .NET CLI instead of MSBuild. These are different in terms of functionality, because not all MSBuild’s features and functions may carry over into the .NET CLI. The basic functionality should be the same, but you may notice problems if you’re using a lot of advanced MSBuild customizations.
How much retraining will my staff need?
This depends totally on your individual case. For example, teams using Windows Workflow Foundation (WF) may need a ton of training to learn a new workflow library. In contrast, developers using WCF but who have interacted with Web API will likely need less training to learn Web API fully. And teams that are on ASP.NET MVC will have a simpler time learning .NET5+ compared to teams still using ASP.NET Web Forms.
.NET5+ is in C# (same as .NET Core), but .NET5+ is still a new system. You should allocate time for about as much training as you would for your staff to learn other frameworks. Communicate with your developers! They know what features they’re using and what new ones they’ll need time to learn.
How complex is the .NET migration going to be?
Again, this depends totally on your individual case. How many of your applications rely on features and tools that won’t migrate in the .NET5+ release? Which versions of Framework or Core are different applications running? If you’re running everything on .NET Framework, this is going to be a major migration. If you’re on .NET Core 3.x, however, you’ve got more time to transition, and the transition will be less jarring because .NET5+ is the next version of .NET Core.
When it comes to your servers, .NET5+ will run on all supported versions of Windows. This means you won’t have to update Windows Server until your version reaches end-of-life (EOL). Once the server OS reaches EOL (check out this schedule), you’ll have to carefully consider the migration path you’ll take to update based on your applications and their dependencies.
Prepare for Your .NET Migration Now
.NET5+ is an unavoidable software update that will come with some growing pains.
Fortunately, you’ve got time before .NET Framework and .NET Core will be fully deprecated, but don’t wait to start planning! Deprecation will sneak up on you sooner than you realize. If you spend a little time between now and end-of-life planning and executing, your migration will be nearly pain-free.
Consider these steps for preparing your migration:
Step 1. Inventory Your Existing Applications
Start the process today of assessing your applications to see what’s running .NET Framework and .NET Core and which versions they’re using. Many developers will know this off the top of their heads or can provide quick answers.
Step 2. Assess Deprecated Components
Determine which, if any, of the major deprecated libraries your applications are using. If developers don’t know already, a brief survey of the code base should quickly clarify.
Step 3. Prioritize with Stakeholders
Although developers will be the best resource to assess how complex and costly a technical migration will be, stakeholders may not be prepared to invest in rewriting applications to not use technologies deprecated in .NET5+. Instead, they may wish to take the opportunity to rewrite the entire application to align with the business strategy.
Step 4. Prepare a Rough Migration Schedule
There’s no rush to migrate your applications. You’ll have several years before .NET Core and .NET Framework reach end-of-life, and having a rough schedule will give peace of mind to development teams and help prepare stakeholders for possible costs and risks in the mid-term.
Step 5. Increase Your Release Velocity
.NET5+ is a great lesson in the importance of updating regularly. Migrations that will be extremely difficult for those who rarely update will be much easier (maybe even trivial!) for those who do releases more often and change deployment flexibility by investing in automation.