Moving from .NET Framework to .NET Core: 5 Things You Should Know Beforehand

Since its release back in 2016, .NET Core has attracted a lot of attention across businesses and CTOs. It was marketed as an open-source software framework that works on Windows, Linux, and macOS as well as facilitates cross-platform development.
Although .NET Core was not presented as a successor of the .NET Framework, they are often compared. There has been no obvious leader since the .NET Framework’s last update in 2019, which is why the question of migration arises. Should your company launch the transition from .NET Framework to .NET Core? According to the 2019 Stack Overflow survey, .NET Core scored first place in the category “Favorite Framework, Libraries, and Tools with 77.2%”. But what are the main challenges of migration, and what should you know before even considering it?
Why Is Migration from .NET Framework to .NET Core Relevant?
Why update .NET Framework to .NET Core if Microsoft keeps .NET Framework afloat and is not planning on terminating new releases and technical support? Does it bring benefits that justify spending time and money on the complex transition process? Has .NET Framework become a legacy system that needs to be moved from, or does it still offer something beneficial?
- Unlike .NET Framework, .NET Core offers portability or, in other words, the ability to develop and deploy using any operating system — Windows, macOS, or Linux;
- .NET Core offers higher performance as many businesses reported after going through the transition from .NET Framework;
- .NET Core ensures simpler package management, allowing developers to save a significant amount of time working with NuGet packages.
However, they are not that different and have many features in common. The best approach is to start migrating from the .NET Framework to .NET Core gradually and step-by-step. There is no immediate rush to move to .NET Core, but it does look like this framework is the future.
The comparison table: .NET Framework vs .NET Core

The bottom line is that migration from the .NET Framework to .NET Core does not always make sense. Especially it becomes counterproductive when your application depends on libraries and packages that are not supported by .NET Core. If your application’s functionality is stable with the legacy technology, there is no need in force-migrating to the new technology that might destabilize the system. However, if the migration is relevant to achieve your business goals and needs, it is possible to mitigate technical difficulties and execute the shift.
What You Should Know Before Moving from .NET Framework to .NET Core
Due to the complexity of moving from the .NET Framework to the .NET Core, there are a number of things you should know before the migration. Our short but comprehensive guide is based on experience with our projects and first-hand information collected by businesses who successfully transitioned.
Migrate from ASP.NET MVC
Since this migration is the easiest step, many companies choose to start with it. Thanks to thorough Microsoft documentation, you can relatively quickly and easily execute this step. Begin by creating a new .NET Core project. Then migrate startup and initialization, content and configurations, views and actions.
There are two ways of performing this task — manual or automated. Both have their own benefits; for example, automation saves time, whereas a manual approach will give you a chance to review the contents and save money on an automation tool. You simply open two instances of Visual Studio simultaneously, copy and paste the content, and make changes if necessary on the go.
Analyze NuGet dependencies
At first, analyze your NuGet dependencies by moving your project to PackageReference format. Then visit nuget.org to check the compatibility of the dependencies. Another way to analyze the compatibility is to use the NuGet Package Explorer tool. It contains sufficient information about each NuGet dependency.
In case you discover NuGet dependencies that are not compatible with .NET Core, there are some approaches you can take to proceed with the migration:
- Contact developers and ask them for support. Remember that .NET Core is open-source and developers are volunteers, which is why you should be mindful of their time and efforts;
- Visit nuget.org and search for a package that fulfills similar functionality as the one you are using now;
- If possible, try to write a code that will accomplish the same tasks as the package itself.
- New versions keep being released; therefore, you can simply wait until the day of the release and not use some app functionality until then. Contact the .NET team to let them know which library you would like to use.
Migrate from WebForms
Microsoft prepared very comprehensive documentation for migration to .NET Core. However, you will not find anything concerning WebForms. It is not a mistake — WebForms are not supported by .NET Core.
This is why the process of moving WebForms is called porting from .NET Framework to .NET Core. Since it implies a complete re-implementation and shift of basic development paradigms, the process of porting is truly complex and long. There are two main approaches:
- You can start from scratch and write a whole new system, which takes a lot of effort, time, and resources. Since every change to the existing system needs to be duplicated in the new version, the process of rewriting slows down the work.
- Or you can gradually migrate the system page by page by rebuilding the entire core library and migrating every page one by one. For this, you would have to run two core libraries simultaneously.
Read the full article on ModLogix
Originally published at https://modlogix.com on January 25, 2021.