This article was translated and first published by Grape City Technical Team


Reprinted please indicate the source:
Grape City Official Website, Grape City provides developers with professional development tools, solutions and services to empower developers.

We’re very happy to release it. Version 6 of the Net6 preview, this is the penultimate preview. Between this preview release and the last preview, we’ll get into the RC phase, and there will be two RCs. This version itself has relatively little content, while Preview7 has more content. After all previews have been released, we will continue to work on fixes until the final release in November. Please look forward to it together. A new version of.NET.

NET 6 Preview 6 Download the Linux, MacOS, and Windows versions according to your needs.

  • Setup programs and binaries
  • Linux packages
  • Release notes
  • API differences
  • Known issues
  • GitHub Issue Tracker

See ASP.NET Core, EF Core, and. NET Maui article to learn more details about the new features for the Web, data access, and client scenarios.

 

Starting with.NET 6 Preview 6, we have tested and supported Visual Studio 2022 Preview 2. Visual Studio 2022 can be used specifically for. NET 6 development of Visual Studio tools such as. Development in NET Maui, hot reloading of C applications, a new Web Live preview of WebForms, and other performance improvements in the IDE experience. .net6 has also been tested with Visual Studio Computing 8.9.

 

Check out a discussion of new.NET features.

X64 emulation update

We have finished adding 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.

 

The following two points need to be achieved:

  • Installed in parallel
  • Use the.NET CLI to achieve the first-class architecture goal to enable the native architecture SDK in all scenarios.

But the current inconvenience is before (after) the parallel installer is available. Net6), you need to install all x64 versions or all ARM64 versions. If you want to switch, you need to unmount/delete everything on your ARM64 computer. .net version.

Tools: Improvements to the.NET SDK optional workloads

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

 

L DotNet Workload Search – Lists installable workloads

L dotnet workload unload – if the workload is no longer needed, delete the specified workload. It’s also a good choice to save space

L dotnet workload repair – reinstall all previously installed workloads

 

If the installation fails because of a poor network connection, you can fix the problem.

 

The optional workload consists of multiple workload packages, so some load packages are installed successfully and some installations fail.

In the previous preview, we added the following commands:

  • DotNet Workload Install – Install the workload
  • DotNet Workload List – lists the installed workloads
  • DotNet Workload Update – Updates the installed workload

Library: the System. DirectoryServices. Separate Protocols support TLS

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

Credit to @iinuwa.

Tool: CrossGen2 replaces CrossGen

CrossGen2 has been enabled for all existing CrossGen scenarios. In this milestone, we also removed the (old) CrossGen from the SDK, and the old CrossGem is no longer accessible and unusable.

 

CrossGen (1 and 2) supports IL precompilation to native code as a release step. Precompilation helps a lot with startup improvements. CrossGen2 is a start-from-scratch implementation that has proven to be an advanced platform for code generation innovation. For example, CrossGen2 can generate code for a broader set of IL patterns than CrossGen1.

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

Library: Sync-over-async performance improvements

Sync-over-async is a common type of blocking work. When a thread pool worker thread occurs, it causes starvation. Thread injection that is too slow may delay the execution of other queued work, and may delay the resolution of hunger problems.

This change increases the thread injection rate by default when sync-over-async is the only type of blocking thread that occurs on the thread pool worker thread. There are new AppContext configuration values that can be used to configure the thread injection rate in response to sync-over-async.

Runtime: W^x memory policy

We support W^ x memory protection. This is a requirement for Apple Silicon and an important security measure for other operating systems.

This property has an exception name and should be read as “write exclusive execution.” This means that memory pages can be marked as read/write or read/execute, but not any combination that includes write and execute. For example, write/execute pages are affected by buffer overflow attacks.

This feature requires changes to be made throughout the product, regardless of the write/execute page. For example, one of the changes to Preview 6 is that it requires the JIT to work with the W^X schema we use.

W^x is a requirement for MacOS on Apple’s silicon chip, in. NET 6 is optional in all other environments and is available in. NET 7 May be the default mode in all environments.

Note: The W^x implementation has a boot regression with.net6 in all environments except Apple Silicon, which will act as. Part of Net7 solution. Since the operating system supports this scenario, the Apple Silicon implementation does not have this regression.

Codegen update log

Include the following code changes in Preview 6:

Dynamic PGO

  • Added option to choose protect DEVITET classes randomly chosen https://github.com/dotnet/run…
  • PGO/DEVILT diagnosis to improve https://github.com/dotnet/run…

LSRA

  • Refactor the LSRA heuristic selection

https://github.com/dotnet/run…

  1. Debug mode includes a COMPlus variable that will allow the user to set heuristic ordering
  2. Adjust the heuristic algorithm of registers to select the best register candidate to overflow

https://github.com/dotnet/run…

Improvements based on these content changes:

More improvements:

The code quality

Eliminate redundant “test” instruction https://github.com/dotnet/run…

conclusion

This release will soon be over, so try out the changes mentioned in Preview6 as soon as possible.

Thanks to everyone who contributed to the.net6 launch. In the future, Grape City will continue to bring you more. Net6 updates related content to share.