This article was translated and first published by the grape city technical team
Please indicate the source for reprinting: Grape City official website , Grape City provides developers with professional development tools, solutions and services, and empowers developers.
We are very happy to release the 6th version of the .NET6 preview. This preview is the penultimate preview. After this preview is released and before the last preview, we will enter the RC period, and there will be two RCs. This version itself is relatively less content, and Preview7 content will be more. After all preview releases are over, we will continue to fix the problems until the final version is released in November. Please look forward to the new version of .NET.
.NET 6 Preview 6 download address , download different versions of Linux,, macOS, and Windows according to your needs.
- installer and binary file
- Linux packages
- Release Notes
- API difference
- Known issues
- GitHub issue tracker
Please refer to the ASP.NET Core , EF Core and .NET MAUI articles to learn more about the new features of the web, data access, and client scenarios.
Starting from .NET 6 Preview 6, we have tested and supported Visual Studio 2022 Preview 2 . Visual Studio 2022 can use Visual Studio tools developed specifically for .NET 6, such as development in .NET MAUI, hot reloading of C applications, previews of the new Web Live for WebForms, and other performance improvements in the IDE experience. .net6 has also been tested with visualstudioformac8.9 .
See NET new feature discussion .
x64 emulation update
We have finished adding support for Apple Silicon for macOS and Arm64 for Windows. The rest is to support x64 emulation on macOS, Apple Silicon and Windows Arm64.
Need to do the following two points to achieve:
- Install parallel
- Use .NET CLI to achieve first-class architecture goals to enable native architecture SDK in all scenarios.
But the current inconvenience is that before the parallel installer is available (in .NET6 afterwards), you need to install all x64 versions or all Arm64 versions. If you want to switch, you need to uninstall/delete all .NET versions on the Arm64 computer.
Tools: .NET SDK optional workload improvements
We added three new workload commands for better discovery and management.
l dotnet workload search-list installable workloads
l dotnet workload offload-if the workload is no longer needed, delete the specified workload. Also a good choice to save space
l dotnet workload repair-reinstall all previously installed workloads
If the installation fails due to a bad network connection, this problem can be solved.
Optional workload consists of multiple workload packages, so some load packages will be installed successfully and some will fail.
In the previous preview, we added the following commands:
- dotnet workload install-install workload
- dotnet workload list-lists installed workloads
- dotnet workload update-update the installed workload
Library: TLS support for System.DirectoryServices.Protocols
TLS support has been enabled for System.DirectoryServices.Protocols of Linux and macOS. 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 solutions. 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 pre-compilation of IL to native code as a release step. Pre-compilation is of great help to the improvement of startup. Crossgen2 is an implementation from the ground up and 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 use crossgen2 to enable pre-compilation.
Library: Sync-over-async performance improvement
Sync-over-async is a common type of blocking work. When a thread pool worker thread occurs, it causes starvation. Too slow thread injection may delay the execution of other queued jobs and may delay the resolution of starvation problems.
When Sync-over-async is the only blocking thread that occurs on the thread pool worker thread, this change increases the thread injection rate by default. There are some new AppContext configuration values that can be used to configure the thread injection rate in response to Sync-over-async.
Runtime: W^x memory strategy
We support the protection of W^x memory. This is a requirement of Apple Silicon and an important security measure for other operating systems.
This feature has an exception name and it should be read as "write exclusive execution". This means that a memory page can be marked as read/write or read/execute, but it cannot be any combination of write and execute. For example, write/execute pages will be affected by buffer overflow attacks.
This feature requires changes throughout the product, regardless of whether the write/execute page is used. For example, a change in preview 6 is that it requires JIT to collaborate with the W^X solution we adopted.
W^x is a requirement of macOS on Apple's silicon machine, is optional in all other environments of .NET 6, and may be the default mode in all environments of .NET 7.
Note: W^x implementation has a startup regression with .net6 in all environments except Apple Silicon, and it will be resolved as a part of .NET7. Since the operating system supports this scenario, the Apple Silicon implementation has no such regression.
CodeGen update log
The following code changes are included in Preview 6:
Dynamic PGO
- Add option to choose a random selection of protected DEVITT class
https://github.com/dotnet/runtime/pull/53399 - PGO/DEVILT diagnosis improvement
https://github.com/dotnet/runtime/pull/53247
LSRA
- Refactoring LSRA inspired selection
https://github.com/dotnet/runtime/pull/52832
- DEBUG mode contains a COMPlus variable, LsraOrdering will allow users to set heuristic ordering
- Adjust the register heuristic algorithm to select the best register candidate to overflow
https://github.com/dotnet/runtime/pull/53853
The improvement is based on these content changes:
More improvements:
Code quality
Eliminate redundant "test" instructions
https://github.com/dotnet/runtime/pull/53214
to sum up
This release will soon be over. You can try the content changes mentioned in Preview6 as soon as possible.
Thanks to everyone who contributed to the .NET6 release. In the future, Grape City will continue to bring you more.net6 update related content sharing.
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。