We are very happy to announce the release of .NET 6 Preview 6. Preview 6 is the penultimate preview before our RC version is released. We will have two RC versions. This version itself is relatively small, while the preview version 7 will be larger. After that, we will carry out quality fixes until the final version in November. We are looking forward to a great new .NET version.
You can download .NET 6 Preview 6 for Linux, macOS, and Windows.
- Installer and binaries
- Container image
- Linux packages
- Release notes
- API differences
- 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 solutions.
Starting from .NET 6 Preview 6, we have tested and supported Visual Studio 2022 Preview 2. Visual Studio 2022 is a development tool you can use to develop .NET 6, such as .NET MAUI development, hot reloading of C# applications, new Web real-time 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 to learn more about engineers’ discussions on the latest .NET features.
Download .NET 6 Preview 6 for Linux, macOS, and Windows:
https://dotnet.microsoft.com/download/dotnet/6.0
Installer and binaries:
https://dotnet.microsoft.com/download/dotnet/6.0
Container image:
https://hub.docker.com/_/microsoft-dotnet
Linux package:
https://github.com/dotnet/core/blob/main/release-notes/6.0/install-linux.md
Release notes:
https://github.com/dotnet/core/blob/main/release-notes/6.0/README.md
API differences:
https://github.com/dotnet/core/tree/main/release-notes/6.0/preview/api-diff/preview6
Known issues:
https://github.com/dotnet/core/blob/main/release-notes/6.0/known-issues.md
GitHub issue tracker:
https://github.com/dotnet/core/issues/6467
ASP.NET Core:
https://devblogs.microsoft.com/aspnet/asp-net-core-updates-in-net-6-preview-6/
EF Core:
.NET MAUI:
https://devblogs.microsoft.com/dotnet/announcing-net-maui-preview-6/
Visual Studio 2022 Preview 2:
https://docs.microsoft.com/en-us/visualstudio/releases/2022/release-notes-preview#17.0.0-pre.2.0
Visual Studio 2022:
https://visualstudio.microsoft.com/vs/preview/
Visual Studio for Mac 8.9:
https://visualstudio.microsoft.com/zh-hans/vs/mac/
Conversation post:
https://devblogs.microsoft.com/dotnet/category/conversations/
x64 emulation update
We have completed support for Apple Silicon for macOS and Arm64 for Windows. The rest is to support x64 emulation on macOS Apple Silicon and Windows Arm64. We need to do two things to achieve this.
- Side-by-side installer
- The first-class architecture targeting .NET CLI (mainly) supports the use of native architecture SDK in various scenarios.
Before you can use the side-by-side installer (later in .NET 6), 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 machine. Sorry, this can only be achieved at this stage.
macOS Apple Silicon:
https://support.apple.com/zh-cn/HT211861
Windows Arm64:
Support x64 emulation:
https://github.com/dotnet/designs/pull/217
Side by side installer:
https://github.com/dotnet/designs/pull/217
First-class architecture targeting .NET CLI:
https://github.com/dotnet/designs/pull/233
Tools: .NET SDK optional workload improvements
We have added three new workload commands for better discovery and management.
- dotnet workload search—list the workloads that can be installed.
- dotnet workload uninstall — If you no longer need a workload, delete the specified workload. It is also a good choice to save space.
dotnet workload repair — Reinstall all the workloads you previously installed.
- This is useful if your installation fails in the middle due to a disconnected internet connection.
- Optional workloads consist of multiple workload packages, so sometimes you will find that some of these workload packages are installed successfully, while others are not.
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.
Work load:
https://github.com/dotnet/designs/blob/main/accepted/2020/workloads/workloads.md
Library: TLS support for System.DirectoryServices.Protocols
TLS support has been enabled for System.DirectoryServices.Protocols of Linux and macOS. It has been enabled for Windows before. .NET users can now enjoy secure communication with the LDAP server.
Credit to @iinuwa.
System.DirectoryServices.Protocols :
Enable TLS support:
https://github.com/dotnet/runtime/pull/52904
@iinuwa:
Tool: Crossgen2 replaces crossgen
Crossgen2 has been enabled for all existing crossgen scenes. 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 to native code. Pre-compilation is mainly beneficial to improve startup. Crossgen2 is an implementation from the ground up and has proven to be an excellent platform for code generation innovation.
The following MSBuild properties demonstrate how to use crossgen2 to enable precompilation.
<!-- Enable pre-compiling native code (in ready-to-run format) with crossgen2 -->
<PublishReadyToRun>true</PublishReadyToRun>
<!-- Enable generating a composite R2R image -->
<PublishReadyToRunComposite>true</PublishReadyToRunComposite>
Crossgen2:
https://devblogs.microsoft.com/dotnet/conversation-about-crossgen2/
Library: Improved asynchronous synchronization performance
Asynchronous synchronization is a common type of blocking work. When it happens on a thread pool worker thread, it causes starvation. Slow thread injection may delay the execution of other threads already in the queue and delay the time to resolve the starvation problem.
When the thread pool worker thread is blocked due to asynchronous synchronization, 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 asynchronous synchronization.
Asynchronous synchronization:
Change:
https://github.com/dotnet/runtime/pull/53471
New AppContext configuration value:
Runtime: W^X memory strategy
We are enabling support for W^X memory protection. This is a requirement of Apple Silicon machines and a useful security measure on other operating systems.
This feature has an unusual name. It should be read as "write exclusive execute". This means that a memory page can be marked as read/write or read/execute, but it cannot include any combination of write and execute. For example, write/execute pages are easily exploited by buffer overflow attacks.
This feature needs to be changed throughout the product, no matter where the write/execute page is used. For example, Preview 6 includes a change that requires JIT to work with the W^X scheme we adopted.
W^X is a requirement of macOS on Apple Silicon machines, 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 in all environments of .NET 6, except for Apple Silicon. It will be resolved as part of .NET 7. There is no such regression in Apple Silicon's implementation because of the operating system's support for this scheme.
W^X memory protection:
https://github.com/dotnet/designs/blob/main/accepted/2021/runtime-security-mitigations.md#wx
Enable support:
https://github.com/dotnet/runtime/issues/50391
JIT cooperates with the W^X scheme we adopted:
https://github.com/dotnet/runtime/pull/53173
Operating system support for this scheme:
CodeGen change log
The following code generation changes are included in Preview 6.
Dynamic PGO:
- Add option to randomly select protected devirt class https://github.com/dotnet/runtime/pull/53399
- pgo/devirt diagnosis improvement https://github.com/dotnet/runtime/pull/53247
LSRA:
Refactor LSRA heuristic choice https://github.com/dotnet/runtime/pull/52832
- Now, the debug mode contains a COMPlus variable, and LsraOrdering will let the user set heuristic ordering.
- Adjust the register heuristics to select the best register candidate overflow. https://github.com/dotnet/runtime/pull/53853
The following improvements are based on these changes.
More improvements:
- Windows x86
- Windows x64
- More information
LSRA:
https://github.com/dotnet/runtime/blob/main/docs/design/coreclr/jit/lsra-detail.md
Windows x86:
https://github.com/DrewScoggins/performance-2/issues/6612
Windows x64:
https://github.com/DrewScoggins/performance-2/issues/6592
More information:
https://github.com/DrewScoggins/performance-2/issues/6593
Code quality
Eliminate redundant "test" instructions https://github.com/dotnet/runtime/pull/53214
Concluding remarks
Every preview version is released at any time, and soon we will only deal with the most urgent feedback to provide the highest quality assurance for our final version. If you have not tried .NET 6, please try it now. Because this will be your last chance to influence the release.
Thanks to everyone who contributed to making .NET 6 a better version.
Thank you for being a .NET developer.
Finally, if you have any .NET-related development questions, please go to the Microsoft Q&A forum to ask questions.
Microsoft Q&A Forum:
https://docs.microsoft.com/en-us/answers/products/dotnet
Scan the QR code to follow Microsoft MSDN to get more first-hand technical information and official learning materials from Microsoft!
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。