DotNet 6: Let’s Get to Know What the Fuss Is All About

Since Microsoft announced the release of its prestigious .Net 6 frameworks, it has created a buzz around the development community. So, let’s get to know what the fuss is all about.

4 min read
Nov 1, 2021
DotNet-6-Let-s-Get-to-Know-What-the-Fuss-Is-All-About

Ever since Microsoft has announced the launch of the latest version in the lineup of the .Net series, it has created a heavy buzz in the development world. Everyone is talking about it, so, here’s our take to let you know what the fuss is all about.

.Net 6 — the next generation of the software development platform will finish the unification Microsoft promised back when releasing the .Net 5. It is scheduled to go live during the .NET Conf 2021 held from 9th to 11th Nov.

The journey of the unification process of .Net to create one single .Net platform from the separate .Net Core, .Net framework, and Xamarin started with .Net 5 but was left incomplete last year. However, the groundwork laid by the .Net 5 for unification is being continued and will complete with the arrival of .Net 6.

.Net 6 packs many features such as integration for Android, iOS, and macOS, the extension of Blazor client web tool to build hybrid apps with web and native UIs, etc. However, the most notable and groundbreaking features include Profile-Guided Optimization (PGO), Dynamic PGO, HTTP/3, Crossgen2, Control-flow Enforcement Technology (CET), etc.

All these features are said to increase the productivity and performance of the framework. So, let’s get to know each of them in detail.

Profile Guided Optimization (PGO)

PGO is a compiler optimization technique that uses profiling to improve performance. It is based on the assumption that the code executed at the beginning is often uniform, leveraging which can deliver high performance. PGO in .Net 6 can compile code at higher quality at the time of startup. Further, it’ll rearrange the code binaries used during the startup so they can be co-located near the beginning of the file.

It is one of the most important capabilities that exist in many other development platforms. Here’s what else Profile Guided Optimization can do in .Net 6:

  • Reduce file size after compilation and compile low-used code in lower quality.
  • It’ll compile the code at higher quality during startup.
  • Attain higher productivity as the system has been rebuilt from the ground up.

Yes, the PGO has been rebuilt from the scratch for .Net 6 as the older version was difficult to use in legacy .Net frameworks. Simple integration of PGO data, tools available to process it, the construction flow, friendly text format, and PGO data collection tools are the main reasons to enable PGO in .Net 6.

Crossgen2

Incorporating Crossgen2 technology in .Net 6 is a big step forward in the right direction. The goal here is to make Crossgen2 a standalone compiler rather than a separate compiler like the Crossgen1. The predecessor was only a runtime compilation consisting of just the required components to enable code generation.

This older Crossgen1 technology created many problems at that time thus needed an upgrade. The Crossgen2 will help resolve such issues for ahead-of-time-pre-compilation.

Dynamic PGO

With .Net 6, Microsoft has included dynamic PGO which is a mirror image of static PGO as mentioned in the first point. But the only difference is the static PGO is integrated with Crossgen2, whereas the Dynamic PGO is integrated with RyuJIT.

The thing with Static PGO is it requires special tools and separate training. On the other hand, Dynamic PGO is automatic and just requires you to use the running apps for necessary data collection. Another difference between the two is the data of Static PGO is stored while the data of dynamic PGO is lost at the end of the application.

Other utilities of Dynamic PGO include transforming the interface call into a non-virtual one for improved performance, Crossgen2 and Dynamic PGO helps in learning compilation, and Crossgen2 integration will allow a higher level of compilation.

HTTP/3

HTTP/3 included in .Net 6 helps to resolve the functional and performance issues that existed in the previous versions of HTTP. Further, it brings many new features and uses a new connection protocol: QUIC. This connection protocol uses UDP and also incorporates TLS, which enables faster connection.

The great thing about using QUIC is they are independent of IP addresses, unlike TPC. What this means is mobile users can move from mobile data to Wi-Fi effortlessly while maintaining the same connection for long downloads.

Intel Control-flow Enforcement Technology (CET)

This intel technology, available in some of the latest processors, helps protect software from the most common types of attacks involving control-flow hijacking. It also adds hardware features for enhanced security against those attacks. With CET Shadow Stack enabled, the processor along with system OS can trace the control-flow calls.

Then those calls are returned in a thread in addition to the data stack, which helps it to detect unintended changes in the control-flow. Further, the Shadow Stack is protected from accessing memory files by app code to defend against attacks that involve ROP (Return-Oriented Programming).

macOS and Windows Arm 64 Update

The .Net 6 RC2 released on October 12, 2021, included another big change from the .Net team. It stated that the project to support macOS and Windows arm64 is almost complete. Until now, arm64 and x64 builds were overwritten by each other leading to unhappiness in the users. But with RC 2, arm64 + x64 can co-exist by installing them in different locations.

The CLI has enabled the Arm 64 SDK to carry out Arm64 and x64 development with the required runtime pre-installed. .Net team prefers to use Arm64 as it provides an overall better experience. Also, many other changes are included for performance improvements.

Conclusion

The .Net development team has released around 7 previews and 2 release candidates of .Net 6 until now. All these previews and RCs cite many capabilities and enhancements that are likely going to be part of the final build releasing Nov 9. However, we have pretty much covered the biggest of all changes in the .Net 6 that meet the developers’ expectations and enhance the user experience for end-users as well.

Further, Microsoft has touted improvements in .Net libraries and the addition of APIs. But whatever features are coming with .Net 6 will lay the foundation for the next projects. However, these big features will take the framework further in obvious and non-obvious ways.

You may also like

Dot-Net-6-and-How-It-Impacts-Various-Operating-Systems
Jun 14, 2022

Dot Net 6 and How It Impacts Various Operating Systems?

I delved deeper into Dot Net 6 into what new features and functionalities. Here’s how Dot Net 6 has impacted the development of various operating systems.
4 min read
Read More
NEt-6-vs-Net-5-How-Net-6-Has-Changed-the-Game-of-Software-Development
Apr 10, 2022

.Net 6 vs .Net 5: How .Net 6 Has Changed the Game of Software Development?

Let’s find out which one is better .Net 6 or .Net 5 and how .Net 6 has changed the game of software development.
6 min read
Read More
What-s-New-With-React-Native-v0-66-Best-Highlights-of-the-Release
Jan 6, 2022

What’s New With React Native v0.66? Best Highlights of the Release

Facebook released the latest version of React Native — a cross-platform app development framework. Let’s get to know the best highlights of the React Native v0.66 and older versions as well.
4 min read
Read More

Let’s Connect!

Work can be a fun when we know and understand each other well. Let's start conversation to new beginning
  • Give us a Call

    +91 63542 35108

    To discuss what we can do for you Give us a Call
  • Write to us

    connect@ashutec.com

    Tell us about your next project Write to us

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.