.net 6

.NET 6: The MOST promising FEATURES

Dotnetsafer
Dotnetsafer

Microsoft is putting the batteries and already presents .NET 6 Preview 5. According to what they tell us, they are already in the second half of the .NET 6 version and they are beginning to teach new features that promise a lot. 🤗

What is .NET? What is it for?

What is .NET in general, is a Microsoft platform to develop Software, covering many operating systems such as WindowsiOSLinuxAndroid … The main idea of ​​.NET is to be able to develop applications independent of the physical architecture or the operating system in the one that was going to be executed.
Its main advantages are:

  • Decreased development time
  • Use of predesigned functionalities
  • Reduction of development and maintenance cost
  • Simplification of maintenance

Okay, I understand. And what is .NET 6? 🤔

.NET 6 is the new version of .NET (currently .NET 5) that Microsoft promises to release on November 9 of this year. It brings many improvements and new features compared to .NET 5.

What are .NET 6 new features?

If we speak in general, we can speak from .NET MAUI, through the new implementation of the 64-bit architecture, to Visual Studio 2022 and its function more… 😎 But we are going to explain the most important ones and the ones you should know.

NuGet package validation

Package validation tools will allow NuGet library developers to validate that their packages are consistent and well-formed.

Its main characteristics are:

  • Validate that there are no important changes in the versions
  • Validate that the package has the same set of public APIs for all specific runtime implementations.
  • Determine applicability gaps in the target framework or in the execution time.

Workload Enhancements in the .NET SDK

Microsoft reports that it has added new workload commands in .NET 6 to improve administration:

  • dotnet workload search List the workloads available to install.
  • dotnet workload unistall Removes the specified workload if you no longer need a workload. It is also a good option to save space.
  • dotnet workload repair Reinstall all previously installed workloads.

Crossgen2

Crossgen allows IL precompiling into native code as a publishing step. Pre-compiling is primarily beneficial to improve startup. Crossgen2 is a scratch implementation that is already proving to be a superior platform for code generation innovation.

Here we can see how to enable the pre-compilation with Crossgen2 from the MSBuild properties:

Windows Forms: The default font

Already with .NET 6 you can set a default font for an Application.SetDefaultFontapplication. Also the pattern it uses is similar to setting high dpi or visual styles. An example:

Here are 2 examples after you set the default font.

Microsoft Sans Serif, 8pt:

.NET 6 default Microsoft Sans Serif font feature
.NET 6 default Microsoft Sans Serif font feature

Chiller, 12pt:

.NET 6 default Chiller font feature
.NET 6 default Chiller font feature

Performance increase in the BigInteger library

BigIntegers parsing of decimal and hexadecimal strings has been improved. In the following photo you can see improvements of up to 89%:

.NET 6 performance test
.NET 6 performance test

SSL 3 support

The .NET crypto APIs support the use of OpenSSL 3 as the preferred native crypto provider on Linux. .NET 6 will use OpenSSL 3 if available. Otherwise, it will use OpenSSL 1.x.

IOS CPU Sampling (SpeedScope)

The graph below shows part of an iOS startup CPU sampling session seen in SpeedScope:

iOS CPU performance test in .NET 6
iOS CPU performance test in .NET 6

Android CPU Sampling (PerfView)

The following image shows the Android CPU sampling seen in PerfView:

Android CPU performance test in .NET 6
iOS CPU performance test in .NET 6

.NET 6 Conclusion

This .NET 6 Preview 5 is perhaps the biggest so far of all the ones that have been released in terms of quantity and quality of features. Right now you can try .NET 6 by downloading it from the Official Web of .NET 6.

As Microsoft says…

The future has arrived

With all the tools already announced and all that remain to be shown and released, development will become a much easier, more optimized and more productive task, highly improving the developer experience in their current and future projects.

From Dotnetsafer we would like to know your opinion. Sound good features? Anything you would like them to take out? Leave it in the comments so we can talk about it. 😊

Summary
.NET 6: The MOST promising FEATURES
Article Name
.NET 6: The MOST promising FEATURES
Description
Microsoft is putting the batteries and already presents .NET 6 Preview 5. They are beginning to teach new features that promise a lot.
Author
Publisher Name
Dotnetsafer
Publisher Logo

0 Comments

Leave a Reply

More great articles

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
cross site scripting

Cross-Site Scripting (XSS) Vulnerabilities (3 Tips to prevent it)

👨‍💻What is Cross Site Scripting (XSS) Cross Site Scripting (XSS) is a vulnerability that allows an attacker to inject client-side…

Read Story
Protecting .NET applications from Visual Studio

How to protect .NET applications from Visual Studio

The other day we were rethinking how .NET applications should be protected, and we came to a conclusion. Now we…

Read Story
Arrow-up