Part One: How did we get here and where are we going?
Articles in this series:
1. Background and discussion
2. Migration steps
3. Real world examples from SharpHat projects
This is the first post in a three part series. In part two, we’ll go over the basic steps of migrating a project from .NET Framework to .NET Core, and then in the third and final post we will explore some specific examples that SharpHat has encountered in our own projects.
Eight years ago, Microsoft made a significant announcement: the rewriting of the .NET Framework as an open-source and cross platform offering. Initially known as .NET Core, it had limited use cases, primarily targeting new development of web and cloud applications. Now, in 2023, .NET Core is now known simply as .NET and is the clear path forward, not only for new development, but also for most existing projects. Although migrating from .NET Framework to .NET Core may present challenges in some cases, most types of projects now have clear migration paths.
Unfortunately, Microsoft hasn’t done us any favors with naming here. The last version to use the .NET Core name was .NET Core 3.1, which was followed by .NET 5, .NET 6, and now .NET 7. For clarity, I will be referring to all of these as “.NET Core”.
In most cases, upgrading from one version of .NET Core to another is very straightforward. If you have a project built with .NET Core 2.0 and you want to upgrade it to .NET (Core) 7, you won’t have too much trouble. Likewise, upgrading .NET Framework to newer .NET Framework versions is usually pretty simple as well. It’s the migration from .NET Framework to .NET Core where the difficulties come in.
There are a number of compelling reasons to consider upgrading to .NET Core, with two key factors being speed and security.
Improved Performance. Microsoft and the .NET community have made thousands of performance improvements throughout the development of .NET Core. It is not uncommon to see applications run more than ten times faster in .NET Core. Your mileage may vary depending on what your code is doing but you can generally expect a noticeable performance boost.
Cross-Platform Capability. Unlike .NET Framework, which is limited to Windows devices, .NET Core enables you to develop for Linux and mobile platforms. Also, if your current setup has you deploying a website to a machine running Windows Server, you may find significant benefits in targeting a Linux Docker container, including speed, reliability, cost-efficiency, and easier maintenance.
Security and Support. One of the many advantages of .NET Core is that it is newer and will receive updates for a much longer time than .NET Framework. The older .NET Framework will receive security fixes for a while, but support will be discontinued well before .NET Core.
Simply More Modern. Working with .NET Core is a much better experience for developers. The C# language has come a long way in the past few years, and many new features are only supported on .NET Core. It was designed from the ground up to be cloud-first, open-source and support modern coding styles and architectures. Also, the tooling surrounding .NET Core integrates with NuGet for package management much better than .NET Framework does, leading to far fewer headaches.
Job Satisfaction. Due to the aforementioned benefits and more, recruiting top talent for a .NET Core project is often easier than for a .NET Framework project. Most developers prefer to keep their skills up to date and work with current technologies.
That concludes Part 1. Stay tuned for Part 2 where we will discuss the steps to actually perform an upgrade!