.net 6

.NET 6 Preview 2 (Release notes + New features)

Dotnetsafer
Dotnetsafer

.NET 6 Preview 2 Announcement 📰 

On March 11 of this year .NET 6 Preview 2 was officially announced. This new version includes runtime performance improvements in initial versions of .NET MAUI, new APIs, compilers for Apple Silicon and more.

Microsoft plans to release monthly previews through October. Releasing in November the final version of .NET 6, with all the new features, such as enhancements for all .NET applications, including desktop, mobile, server,cloud and IoT. From Dotnetsafer we will explan you.


Support 💻

This new version of .NET 6 can be downloaded right now for Windows, Linux and MacOS.

As we have discussed before, .NET 6 will be officially released in November 2021 and will be supported for 3 years. Microsoft promises that .NET 6 will be a big change from .NET 5.

The additions that Microsoft promises to bring are:

  • Android
  • iOS
  • Mac and Mac Catalyst for x64 and M1 chips
  • Windows Arm64

Performance 🚀

Microsoft claims that .NET 6 performance will be much higher than .NET 5. That is very likely since we have seen how in the jumps of its previous versions the performance has been increased at the same time that the memory consumption has been reduced.

They also promise to increase the performance of tools and services to ensure that .NET developers are as productive as possible. Below we can see some of the first performance tests. 


.NET has a lot of experience developing client applications. 👨‍💻

One of the most important parts of what comes to be .NET 6 is mobile development, which is now offered separately from Xamarin. Over time, Xamarin has moved closer to the mainstream of .NET. At this time, with the development of Android, iOS and MacOs it will be integrated into the .NET SDK experience and the .NET libraries will be used.

Microsoft tells us that over the years they have been working to incorporate Mono into .NET, allowing developers to take full advantage of both runtimes without having to worry about compatibility or working with different .NET versions. Microsoft on .NET 5 moved Blazor WebAssembly and is currently using that same model for Xamarin.

Since all .NET applications will now run in the same libraries, Microsoft wants to increase the amount of code that is shared across desktop and mobile platforms. To do this they introduce us to Xamarin.Forms, Xamarin’s cross-platform user interface framework, which is evolving into the .NET cross-platform application user interface. This will allow you to easily write applications for Windows, MacOS, iOS and Android with the same code base. 


.NET MAUI 🔝

They also tell us that .NET MAUI will be added as an enhancement to .NET 6.
.NET MAUI is not just for client application developers. Thanks to all the .NET 6 enhancements, existing Blazor applications will run natively on MacOS and Windows via .NET MAUI.

Another major feature that Microsoft is focusing on is the packaging issue, as there are so many developers with different target platforms, alongside different ways of developing applications. At the end of the day that’s a lot of packages to distribute. They especially focus on applications with the Blazor desktop, as they want that experience to be as seamless as possible. 

Right now Microsoft is looking for strategies to improve the release and version control both locally and in the cloud, as well as on the desktop, so that developers can package, distribute, launch and update their applications on different architectures and desktop platforms. 


Summary of what’s new in .NET6 🏅

  • You will be able to create applications for MacOS, iOS and Android with the .NET libraries.
  • It will allow to create iOS, Android, Windows and MacOS applications from the same code base using .NET MAUI.
  • The ability to share more code and resources between platforms (such as icons, images and more) will be implemented.
  • Ease of running Blazor web applications natively on MacOS and Windows.
  • You can easily package and distribute applications for all the target frameworks you include.

Microsoft ends (for now) telling us the news in .NET 6 telling us that they have made a lot of progress in development and that they will continue to add more features in each Preview of .NET 6.

We are going to dedicate the remainder of this article to dig a little deeper into the new features of .NET 6 Preview 2.


Cross-platform .NET application user interface ✅

From Microsoft, they tell us they have added .NET MAUIs and unique project developer experiences for Android iOS and Mac Catalyst. They also tell us that they have updated their repository with samples of projects that can already be run with .NET 6 Preview 2.


Mac Catalyst ✅

The function of adding the following TargetFramework configuration to any project will be implemented to be able to compile it on MacOS desktop, using Mac Catalyst.


Microsoft tells us that they have enabled a unique experience for .NET MAUI applications. Now what you get is a very clean solution that can be run on Android, iOS, and MacOS. They also tell us that they will add Windows to .NET MAUI in a future Preview.


Shared application icons, images, and fonts ✅

Icons, images, and fonts can be placed in one location in your code, and the .NET MAUI will allow you to work natively on all platforms it targets. These will just track SharedImage or SharedFont in your .csproj file.

Both accept wildcards to include all files within one location.

Launch applications with Host Builder with MauiApp ✅

They currently have extensions for configuring fonts, services, and compatibility renderers for migrate Xamarin.Forms projects. IWindow was added for multi-window support in a future release. They also aim to integrate library authors and control providers with the .NET MAUI.

Control drivers ✅

Lastly, the first controls and properties have been introduced that implement a new controller approach. These include partial label and input, button, and slider and switch implementations. The sample application is HelloMaui, it runs from a single project to MacOS, iOS and Android displaying the current set of ported controls.

Mac OS:

iOS:

Android:

Summary
.NET 6 Preview 2 (Release notes + New features)
Article Name
.NET 6 Preview 2 (Release notes + New features)
Description
.NET 6 is not going to be a final version, but a transition to achieve Microsoft's goal of creating a universal development platform for Windows
Author
Publisher Name
Dotnetsafer
Publisher Logo

0 Comments

Leave a Reply

More great articles

Top 5 tools for developoer

Top 5 tools for any .NET developer

Visual Studio is the best tool for .NET development thanks to all the facilities it offers us. Although it is very complete, it…

Read Story
Blazor Desktop

Blazor Desktop: Like Electron for Javascript but… for .NET?

Blazor Desktop: Electron for .NET? 🤔 Not too long ago, Blazor WebAssembly was just a runtime experiment for C# in a Microsoft…

Read Story
Const Vs Readonly

CONST vs READONLY in C#? (Explanation in 3 minutes)

Who does not have doubts when starting to learn something new?🤔 All the world In this case, when someone starts…

Read Story
Arrow-up