We are pleased to announce. NET 6 preview version 6 is out. Preview 6 is the penultimate preview before our RC release. We will have two RC versions. This release itself is relatively small, and preview 7 will be even larger. After that, we’ll do quality fixes until the final release in November. We’re looking forward to a great new. .net version.

You can download for Linux, macOS, and Windows. NET 6 Preview 6.

  • Setup program and binaries
  • Container mirror
  • Linux software package
  • Release notes
  • API differences
  • Known problems
  • GitHub Problem tracker

See ASP.NET Core, EF Core, and. NET MAUI article to learn more about the new features of the Web, data access, and client solutions.

Since.NET 6 Preview 6, we have tested and supported Visual Studio 2022 Preview 2. Visual Studio 2022 is what you can use for development. Development tools for NET 6, such as.net MAUI development, hot reloading of C# applications, new Web live previews for WebForms, and other performance improvements in the IDE experience. .NET 6 was also tested in Visual Studio for Mac 8.9.

Check out the new conversation post for an in-depth look at the latest engineers. NET functionality discussion.

X64 emulation update

We’ve completed support for Apple Silicon for macOS and Arm64 for Windows. All that remains is support for X64 emulation on macOS Apple Silicon and Windows Arm64. We need to do two things to make this happen.

  • Side by side installation program
  • The first-class architecture targeting the.NET CLI (primarily) supports the use of native architecture SDKS in a variety of scenarios.

Before side-by-side installers can be used (after. NET 6), you need to install all x64 versions or all Arm64 versions. To switch, you need to uninstall/delete all on your Arm64 machine. .net version. I’m sorry, this is the only way to do it at this stage.

Tools:.NET SDK optional workload improvements

We added three new workload commands for better discovery and management.

  • Dotnet Workload Search – Lists installable workloads.
  • Dotnet workload uninstall – If you no longer need a workload, remove the specified workload. It’s also a good choice to save space.
  • Dotnet Workload Repair – Reinstall all workloads that you previously installed.
    • This is very useful if your installation fails in the middle due to a broken Internet connection.
    • The optional workload consists of multiple workload packages, so sometimes you will find that some of them are installed successfully and others are not.

In the previous preview, we added the following command:

  • Dotnet workload Install – Installs the workload.
  • Dotnet Workload List – Lists installed workloads.
  • Dotnet Workload Update – Updates installed workloads.

Library: the System. DirectoryServices. Separate Protocols support TLS

Has the System of Linux and macOS. DirectoryServices. Separate Protocols enable TLS support. It was previously enabled for Windows. .NET users can now enjoy secure communication with the LDAP server.

Thanks to @iinuwa.

Tools: Crossgen2 replaces CrossGen

Crossgen2 is enabled for all existing CrossGen scenarios. With this milestone, we also removed the (old) CrossGen from the SDK. It is no longer accessible and unusable.

Crossgen (1 and 2) supports pre-compilation of IL into native code. Precompilation mainly helps improve startup. Crossgen2 is a scratch implementation that has proven to be an excellent platform for code generation innovation.

The following MSBuild properties demonstrate how to enable precompilation using CrossGen2.

<! -- Enable pre-compiling native code (in ready-to-run format) with crossgen2 --> <PublishReadyToRun>true</PublishReadyToRun> <! -- Enable generating a composite R2R image --> <PublishReadyToRunComposite>true</PublishReadyToRunComposite>Copy the code

Library: Improved asynchronous synchronization performance

Asynchronous synchronization is a common type of blocking work. When it occurs on a thread pool worker thread, it causes starvation. Slow thread injection can delay the execution of other threads already in the queue and delay resolution of hunger issues.

This change increases the thread injection rate by default when blocking occurs on a thread pool worker thread due to asynchronous synchronization. There are new AppContext configuration values that can be used to configure thread injection rates in response to asynchronous synchronization.

Runtime: W^X memory policy

We are enabling support for W^X memory protection. This is a requirement of Apple’s Silicon machines and a useful security measure on other operating systems.

This feature has an unusual name. It should read “Write exclusive Execute”. This means that a memory page can be marked as read/write or read/execute, but cannot include any combination of write and execute. For example, write/execute pages are vulnerable to buffer overflow attacks.

This functionality needs to be changed throughout the product, wherever write/execute pages are used. For example, Preview 6 contains a change that requires the JIT to work with our W^X schema.

W^X is a macOS requirement on Apple Silicon machines, is optional in all other.net 6 environments, and may be the default mode in all.NET 7 environments.

Note: the W^X implementation has a startup regression in all.net 6 environments except Apple Silicon. It will be addressed as part of.NET 7. The Apple Silicon implementation does not have this regression because the operating system supports this solution.

CodeGen Change logs

The following code generation changes are included in Preview 6.

Dynamic PGO

  • Add option to randomly select protected devirt classes github.com/dotnet/runt…
  • Pgo/Devirt diagnostic improvements github.com/dotnet/runt…

LSRA

  • refactoringLSRAHeuristic selectionGithub.com/dotnet/runt…
    • Debug mode now contains a COMPlus variable, and LsraOrdering will let the user set heuristic ordering.
    • Adjust the register heuristics to select the best register candidate for overflow. Github.com/dotnet/runt…

The following improvements are based on these changes.

More improvements:

  • Windows x86
  • Windows x64
  • For more information

The code quality

  • Eliminate redundant “test” instructions github.com/dotnet/runt…

conclusion

As soon as each preview release is released, we will only deal with the most pressing feedback to provide the highest quality assurance for our final release if you haven’t tried it yet. NET 6, please try it now. Because this will be your last chance to influence the launch.

Thanks to everyone who contributed to making.NET 6 a better release.

Thank you for being a.NET developer.

Finally, if you have any.net related development questions, please feel free to ask them in the Microsoft Q&A forum.