Back to blog posts
dotNEt 5.0 to develop all supported platforms: Windows, MacOS and Linux, using basically the same base-code

All you need to know about .NET 5.0

With the release of .NET 5.0, Microsoft is finally bringing clarity to the world of .NET. There’s no longer any core, framework or runtime files. From now on, you’ll find everything you need in a single platform. What do you need to know about .NET 5.0?

To begin with, now there truly is just one version of .NET that you can use to develop for any supported platform: Windows, MacOS and Linux. And, generally speaking, you can do that using the same base code. It’s still possible to create platform-specific software. To do that, use a target framework moniker in the code to specify which (Windows) platform your software is intended to work with. That way, the correct APIs are automatically used in the runtime. The target framework moniker for other operating systems will be available in .NET 6.

Mobile apps

So, what is (and isn’t) possible now? To become a truly unified platform, mobile operating systems obviously need to be supported too. This support for iOS and Android will become available in .NET version 6, which is scheduled for release at the end of this year. For now, you’ll still have to use Xamarin and Unity.

To develop programmes for .NET, you can use Visual Studio, as always. C# 9 and F# 5 were released simultaneously with .NET 5. To be able to use them, you need Visual Studio 16.8 or later for Windows or the latest available version for MacOS. If you want to develop for the new M1 processor from Apply, you’ll have to wait for .NET 6.0.

With a unified platform also comes a universal user interface. Unfortunately, it’s still not 100% ready in version 5.0. That too will have to wait for .NET 6.0. After that, you can develop a single project that runs with the same UI on Windows, Mac, Android and iOS.

No more separate runtime

One of the best new functions of .NET 5.0 is that you can now create truly single-file applications. All files, dependencies and the runtime are contained in a single file. The choice is up to you though. You can still publish applications with everything as individual, separate files. So, you may be thinking: wasn’t it already possible to create single-file apps with .NET 3.1? That option was already there, right? No, because even though everything was distributed as a single file, it would all still unpack on the user’s computer while running and then be placed into temporary folders before executing. Starting with .NET 5.0, the internal structure of the application you are creating has changed. Now, it is directly executed without any noticeable loss of performance.

With new versions, there are inevitably also things that get phased out. In this case, what’s no longer there is functionality that you used to find in the individual frameworks. For example, there is no longer any support for Web Forms. Not a huge surprise, considering .NET Core never supported Web Forms. So, there was already some speculation that Web Forms would disappear along with the .Net framework.

Also the Windows Communication Foundation framework has taken its final bow. And that’s also no surprise, considering this platform-specific framework is of no use in a platform-independent environment like .NET 5. That’s the same reason why Windows Workflow Foundation is not included in .NET 5.

So, to recap:

  • .NET 5.0 is a truly unified platform for multiple operating systems.

  • Support for iOS and Android are on the way (later this year).

  • You can also keep using Visual Studio.

  • C# 9 and F# 5 were released simultaneously with .NET 5.

  • There’s no longer any separate runtime, so applications are single-file.

There are a lot of things that won’t really become available until the next version of .NET comes out. But unless you’re stuck using legacy APIs, there’s no reason at all to wait with switching to .NET 5.0.