What is .NET 5? What You Need to Know Before Migrating
by Eric Seng, on Sep 1, 2020 7:11:17 PM
Microsoft’s .NET 5 was released on 10 November 2020 and has some major changes that can significantly impact your organization.
You'll have to migrate to .NET 5 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.
Jump ahead to FAQ on how the migration could impact your organization.
What's the Big Deal about .NET 5?
.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.
.NET 5 is the future of .NET Core and is almost a complete reimagining of the old .NET Framework. In fact, .NET 5 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 .NET 5 is released, .NET Framework will be deprecated. This means you can only use .NET Framework as long as your operating systems (for example Windows Server 2019) still supports it. And with Microsoft shortening its support lifecycles, your operating system end-of-life will come sooner than you may think.
Although the transition from .NET Core to .NET 5 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.
.NET 5: Independence, Resilience, Cross-platform
The official Microsoft Blog explains that .NET 5 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.”
.NET 5 is meant to help you lower risk, more efficiently develop, and to by extension increase market share. But all this will require some serious up-front preparation.
Negative Effects of .NET 5: Changes and Deprecations
Unlike other changes to .NET in the past, where you could just let your on-the-ground developers take care of things, the .NET 5 release is inevitable and can seriously impact large parts of your code.
A big change starting in .NET 5 is that Microsoft intends to release a major version every November, with only 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. (As of March 2021, there are some updates, now that .NET 6 is in preview.)
|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 use service-oriented architecture/API to connect to other applications or services over a network where the service endpoint is built using WCF.
✘ No Official Replacement
⚠️Community/ Open-source Alternative
|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).
✘ No Official Replacement
⚠️Community/ Open-source Alternative
|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.
.NET Standard essentially serves as a transition between all the .NET implementations prior to .NET 5 (Framework, Core, Mono, etc.). It’s expected to be fully deprecated with .NET 6. For now, .NET Standard can be a good method for migrating your NuGet libraries from .NET Framework to .NET 5+.
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 .NET 5?
Yes, because Microsoft is deprecating Framework starting in November 2020. Framework 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 that 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, the migration from .NET Core to .NET 5 will likely present fewer problems, because .NET 5 is a continuation of .NET Core (the “.NET Core v.Next ,” as Microsoft describes it). That said, Microsoft will end long-term support for the most recent release of Core (3.1.7) around December 2022 and has just announced that .NET Core 2.1 will reach EOS on 21 August 2021, so you should still begin at least planning your migration.
In short, the transition is inevitable, but it may not need to happen until .NET 6 or later.
What will it cost us to migrate to .NET 5?
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 .NET 5 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 .NET 5 applications deployed (versus .NET Framework)?
They are virtually the same, except for web applications. The current .NET 5 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 too (CLI) called MSBuild. With .NET 5, 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 .NET 5+ compared to teams still using ASP.NET Web Forms.
.NET 5 is in C# (same as .NET Core), but .NET 5 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 .NET 5 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 .NET 5 is the next version of .NET Core.
When it comes to your servers, .NET 5 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
.NET 5 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 head 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 .NET 5. Instead, they may wish to take the opportunity to rewrite the entire application to align with business strategy.
Step 4. Prepare a Rough Migration Schedule
Although .NET 5 will be released November 10, 2020, there's no rush to migrate your applications before then. 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
.NET 5 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.
Get the Free .NET migration Guide Today