.NET 6 is on the Road !
During the last years, Microsoft had been working actively on revamping the well-known .NET Framework at first by releasing .NET Core that removed the tight link between code libraries and windows specific components to facilitate the cross platform development and deployment. After that came .NET 5 along with C# 9 with a set of new features and performance enhancements announcing the first part of unification journey by combining .NET Core and Xamarin technologies.
Recently Microsoft announced the delivery of preview version of .NET 6 to accomplish the journey started previously with .NET 5, so in this article we will do a quick presentation of what developers should expect from this new version.
.NET 6 has now built-in functions that supports android, iOS, macOS that were parts of Xamarin open source framework. This integration comes along with the extension of Blazor to facilitate the development of hybrid client app. So developers can now run CLI commands that allows to create mobile projects such as dotnet new android And then execute dotnet run to launch an android emulator to start running the application.
As part of the unification path, .NET 6 included Xamarin.Essentials into their new .NET Multi-platform App UI, allowing developers to reuse the maximum of their code base and deliver a unique user experience for each of their targeted platform and also reuse devices features such as contacts, photos, etc… (Installation Guide)
The next major update is that Blazor had been extended to include desktop applications to complete its prior support to WebAssembly and Server side. As per Microsoft Blazor desktop will be structured to work like Electron.
.NET 6 comes also with CLI enhancements like allowing developers to use response files which represents a set of command line arguments to bypass the character number’s limit of the terminal
The new CLI version has also new directives like suggest that allows you to search for specific commands and parse that demonstrates how the CLI parsed your command.
Finally .NET 6 comes along with many language improvements like the performance enhancement of System.Math and the addition of new methods like SinCos, ReciprocalEstimate, ReciprocalSqrtEstimate and the new overloads of OpenExisting and TryOpenExisting methods for EventWaitHandle, Mutex and Semaphore and the new unsafe api CollectionsMarshal.GetValueRefOrNullRef that facilitates the manipulation of dictionaries.
In this article we did a quick review of the major enhancements that developers should expect from .NET 6. As of now the third preview version is available for test. In order to get an exhaustive list of all the details, you can find them in the official documentation links below.
Thanks for reading and see you next time :)
Fadi