Ready to migrate to .NET 8? Check SSW's .NET 8 Migration consulting page.
Migrating from .NET Framework (4.x) to the latest .NET (5+) brings huge advantages to your app's performance, hosting fees, and maintainability. But it's important that you understand what the road to .NET 5+ looks like for your app before you start breaking things! So how do you ensure your migration is being done the right way?
The differences between a web app built with ASP.NET Framework and one built with ASP.NET Core are immense. The entire request pipeline underwent significant changes, and can often be impossible to migrate in-place. So how can you tackle these challenges the right way?
With outdated NuGet packages, C# stylings and architectures, keeping our .NET Framework applications up to date can be a pain. Especially when we want to make the leap from .NET Framework to .NET for that juicy performance and compatibility bump.
Luckily Microsoft provides excellent tooling for supporting your great leap into .NET. The best part? It's free and open source!
Migrating your project to a new Target Framework Moniker (TFM) can be a complex task, especially when you're dealing with compatibility issues between different Target Framework Monikers (TFMs). It is suggested to handle your migration PBIs (Product Backlog Items) collectively and transition your main branch to the new TFM. Making this judgment call requires careful consideration of factors like the number of PBIs and their estimated completion time.
Here are some essential tips for managing changes that are not compatible with both the old and new TFMs:
Most REST APIs serialise/deserialise to and from JSON format. To perform this serialisation, a .NET web application typically relies on either
Newtonsoft.JsonorSystem.Text.Json.Modern .NET applications prefer
System.Text.JsonoverNewtonsoft.Json- which is commonly found in earlier versions of .NET and .NET Framework projects. This, however, may break in certain usages.This issue needs to be addressed when migrating projects from .NET Framework to modern .NET.
- Do you create a migration plan?
- Do you know how to migrate Web Apps to .NET?
- Do you know how to modernize your .NET applications?
- Do you know how to migrate from System.Web to modern alternatives
- Do you know how to migrate from EDMX to EF Core
- Do you know how to migrate Global.asax to ASP.NET Core?
- Do you know how to migrate OWIN to ASP.NET Core?
- Do you know how to migrate Web.config to ASP.NET Core?
- Do you know how to manage compatibility between different Target Framework Monikers (TFMs)?
- Do you check your API serialisation format?
- Do you know how to migrate frontend to .NET 8?
- Do you use BannedApiAnalyzers to prevent unwanted APIs creeping back in?