.NET 6 RC 1 Released

The first of two Release Candidate versions of .NET 6 released, which resolves functional or performance issues in new features or regressions in existing ones.

Microsoft has released .NET 6 RC 1, the first of two “go live” RC releases that are supported in production. 

.NET 6 Release Candidate 1 has been tested and is supported with Visual Studio 2022 Preview 4. VS 2022 allows users to leverage the Visual Studio tools developed for .NET 6 like development in .NET MAUI, new Web Live Preview for WebForms, Hot Reload for C# apps, and other performance improvements in the IDE experience.

Microsoft said that for the last month or so, the .NET team has been focused exclusively on quality improvements that resolve functional or performance issues in new features or regressions in existing ones. RC 1 release doesn't focus on new goodies, but rather foundational features of .NET 6. Some of these features won't be fully realized for a while.

Talking about the foundational features in .NET 6, Microsoft wrote "In each release, we take on a few projects that take multiple years to complete and that do not deliver their full value for some time. Given that these features have not come to their full fruition, you’ll notice a bias in this post to what we’re likely to do with these features in .NET 7 and beyond."

Some of such features include Source build, Profile-guided optimization (PGO), Dynamic PGO, Crossgen2, Security mitigations, and SDK workloads.

Microsft revealed that it is very close to delivering a fully automated version of Source build, which is a scenario and also infrastructure. The deliverable for source build is a source tarball. The source tarball contains all the source for a SDK, and from there, Red Hat or another organization can build their own version of the SDK. In the Linux ecosystem both source and binary packages or tarballs are required for a given component. .NET already had binary tarballs available and now have source tarballs as well.

Profile Guided Optimization (PGO) is an important capability of most developer platforms. It improves the performance of applications by adding new information to the optimization process that is dependent on how the application executes, not just on the program's code. With .NET 6, Microsoft has rebuild the PGO system from scratch. This was motivated in large part by crossgen2 as the new enabling technology. The runtime libraries are compiled to ready-to-run format optimized with (the new form of) PGO data. This is all enabled with crossgen2. Currently, the team has not enabled anyone else to use PGO to optimize apps. That’s what will be coming next with .NET 7.

Dynamic PGO is the mirror image of the static PGO. Simliler to static PGO which is integrated with crossgen2, dynamic PGO is integrated with RyuJIT. Dynamic PGO is automatic and uses the running application to collect relevant data. This data is lost after every application run. Dynamic PGO is similar to a tracing JIT. With dynamic PGO the JIT can now do further instrumentation during tier 0, to track not just call counts but all of the interesting data it can use for profile-guided optimization, and then it can employ that during the compilation of tier 1.

Crossgen2 replaces crossgen: With this release, Crossgen2 has been enabled for all existing crossgen scenarios, and the .NET team has also removed (the old) crossgen from the SDK, making it no longer accessible and unable to be used. "Crossgen (1 and 2) enables pre-compiling IL to native code as a publishing step. Pre-compilation is primarily beneficial for improving startup. Crossgen2 is a from-scratch implementation that is already proving to be a superior platform for code generation innovation. For example, crossgen2 can generate code for a broader set of IL patterns than crossgen1."

The release adds preview support for two key security mitigations CET, and W^X. These will be enabled by default in .NET 7.

Control-flow Enforcement Technology (CET) from Intel is a security feature available, in some latest Intel and AMD processors, adds potential to the hardware that protect against some common types of attacks involving control-flow hijacking. CET shadow stacks enables the processor and operating system to track the control flow of calls and returns in a thread in the shadow stack in addition to the data stack, and detect unintended changes to the control flow. W^X blocks the simplest attack path by disallowing memory pages to be writeable and executable at the same time. It is available all operating systems with .NET 6 but only enabled by default on Apple Silicon. It will be enabled on all operating systems for .NET 7.

To learn more you can visit the official announcement here.



Next Recommended Reading .NET Core RC 2 Available Now