Migrating from .NET Framework to .NET Core

28th June 2019

.NET Core was born back in June 2016, and at time of writing, it's now on to version 2.2, with a preview of version 3 available for download.

But if you are still using .NET Framework for some or all of your projects, then it might not be obvious what's different with .NET Core, or what features it has.

One of the big differences is that all .NET Core projects are console applications. With these console applications, you can build application models on top of it. At present, the application models that you can build are web applications using ASP.NET Core, libraries and Universal Windows Platform (UWP) apps. Windows Forms and Windows Presentation Foundation (WPF) are not currently supported.

A change to .NET Core from .NET Framework is the way it gets it's updates. .NET Framework gets it's updates from Windows Updates, whilst .NET Core gets them from NuGet packages.

Talking of NuGet packages, .NET Core has been written to include some of the more popular features of Nuget packages that were included in .NET Framework projects.

These include Dependency Injection, which I used Autofac's implementation for in .NET framework projects. For .NET Core, Microsoft have written their own extension for dependency injection, along with Single Page Applications (SPA) with more details of SPA's in my last blog post.

From a personal point of view, I've just started using .NET Core to develop a ASP.NET Core web application, and the main difference is the startup file. As I mentioned earlier in the post, .NET Core applications run off a console application and you can build an application model on top of it.

This is where the syntax is different and to get an idea of how some of the code looks, check out some of the code snippets from my blog post on changing controllers and actions through one route.

With the MVC side of things, it's very similar in a ASP.NET Core web application. You have set up your routes in your startup file, set up any constraints, do your logic in the Controller and output the HTML in the view.

Once I've used it a bit more, I will give you a further update on the things I like about it, and the things that can be improved...

About the author

David Grace

David Grace

Senior .NET web developer | ASP.NET Core | C# | Software developer

Free .NET videos

  • Do you want to watch free videos featuring .NET 7 new features?
  • How about what's new in C# 11?
  • Or a recap on the SOLID principles?
Watch our .NET videos