DEV Community

Cover image for Why You Should Migrate to .NET 5 (and why you shouldn't)
Miles Watson
Miles Watson

Posted on • Edited on

Why You Should Migrate to .NET 5 (and why you shouldn't)

.NET 5 is the latest and greatest version of .NET from the folks over at Microsoft, and it's better than ever. Almost everyone should migrate.

What's all the fuss?

Up until now, .NET has been fragmented into 4 different platforms:

  • Framework
  • Core
  • Standard
  • Xamarin

As you can imagine, this leads to issues with code compatibility, especially when developing cross-platform applications. .NET 5 is an evolution of Core which replaces the need for Standard. It provides a unified platform on which you can build any application.

dotnet_new

Why should I care?

There are three main reasons you should switch over:

  1. Unified platform helps with code reuse across multiple platforms
  2. Language updates to C#, F#, and VB
  3. Performance improvements across the board

Is migrating my applications difficult?

In most cases, migrating to .NET 5 can be done in two steps:

  1. Update to the latest version of the SDK (this can be done by updating VS)
  2. Change the target framework in your project file (.csproj for C#).

Make sure to check any breaking issues before updating - here are breaking changes for .NET Core 3.1 to .NET 5.0.

Why shouldn't I migrate?

There are some older technologies that are no longer supported in .NET 5:

  • Web Forms
  • Windows Communication Foundation
  • Windows Workflow

Newer alternatives to these can be found on Microsoft Docs, but they may take time to implement.

Footnote

If you enjoyed reading this, then consider dropping a like or following me:

I'm just starting out, so the support is greatly appreciated!

Disclaimer - I'm a (mostly) self-taught programmer, and I use my blog to share things that I've learnt on my journey to becoming a better developer. Because of this, I apologise in advance for any inaccuracies I might have made - criticism and corrections are welcome!

Top comments (2)

Collapse
 
mileswatson profile image
Miles Watson

What do you find most useful / most annoying about .NET 5?

Collapse
 
saint4eva profile image
saint4eva

It brings high performance to the table, and makes it easier to write low-level programs. It is the foundational efforts towards unifying .NET. It is unfortunate that some workloads have been shifted to. NET 6 due to the pandemic.