Users of MacBook (M1 version) see that. Net 6 preview 6 supports Apple silicon for MacOS

Time:2021-9-30

This article was translated and launched by the technical team of grape city
Please indicate the source of Reprint: the official website of grape City, which provides professional development tools, solutions and services for developers to empower developers.

We are pleased to release version 6 of the. Net 6 preview, which is the penultimate preview. After the release of this preview and before the last preview, we will enter the RC period, and there will be two RCSs. This version itself has relatively less content, while preview7 has more content. After all preview releases, we will continue to fix the problem until the final version is released in November. Please look forward to the new version of. Net.

. net 6 preview 6 download address. You can download different versions of Linux, MacOS and windows according to your needs.

  • Setup and binaries
  • Linux packages
  • Release notes
  • API differences
  • Known problems
  • GitHub problem tracker

Refer to the asp.net core, EF core, and. Net Maui articles for more details on the new features of 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 use Visual Studio tools developed specifically for. Net 6, such as development in. Net Maui, hot reload of C applications, new web live preview of WebForms, and other performance improvements in the IDE experience Net6 has also been tested with visual studio for Mac 8.9.

 

View a discussion of what’s new in. Net.

X64 simulation update

We have completed 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.

 

The following two points need to be realized:

  • Install parallel
  • Use the. Net cli to achieve state-of-the-art architecture goals to enable the native architecture SDK in all scenarios.

However, it is inconvenient at this time that you need to install all x64 versions or all arm64 versions before the parallel installer is available (in later. Net 6). If you want to switch, you need to uninstall / remove 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 – lists the installable workloads

l   Dotnet workload offload – if the workload is no longer needed, delete the specified workload. It is also a good choice to save space

l   Dotnet workload repair – reinstall all previously installed workloads

 

If the installation fails due to poor network connection, this problem can be solved.

 

The 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 command:

  • Dotnet workload install – installs the workload
  • Dotnet workload list – lists installed workloads
  • Dotnet workload update – updates the installed workload

Library: TLS support for system.directoryservices.protocols

TLS support is enabled for system.directoryservices.protocols for Linux and MacOS. It is already enabled for windows. Net users can now enjoy secure communication with the LDAP server.

Thanks to @ iinuwa.

Tool: crossgen2 replaces crossgen

Crossgen2 has been enabled for all existing crossgen scenarios. In this milestone, we also deleted the (old) crossgen from the SDK. The old crossgem is no longer accessible and cannot be used.

 

Crossgen (1 and 2) supports precompiling IL into native code as a release step. Precompiling is very helpful for the improvement of startup. Crossgen2 is an implementation from scratch 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 enable precompiling using crossgen2.

Users of MacBook (M1 version) see that. Net 6 preview 6 supports Apple silicon for MacOS

Library: performance improvements for sync over Async

Sync over async is a common type of blocking work. When a thread pool worker thread occurs, it causes hunger. Too slow thread injection may delay the operation 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 blocking thread that occurs on the thread pool worker thread. Some new appcontext configuration values are available 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 of Apple silicon and an important security measure for other operating systems.

This attribute 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 of write and execute. For example, write / execute pages can be affected by buffer overflow attacks.

This feature requires changes throughout the product, whether a write / execute page is used. For example, one change in preview 6 is that it requires JIT to cooperate with the w ^ x scheme we adopt.

W ^ x is a requirement of MacOS on Apple’s Silicon machine. It is optional in all other environments of. Net 6, and may be the default mode in all environments of. Net 7.

Note: W ^ x now has a startup regression with. Net6 in all environments except apple silicon, which will be solved as part of. Net7. Because the operating system supports this scenario, the apple silicon implementation does not have this regression.

CodeGen update log

The following code changes are included in preview 6:

Dynamic PGO

  • Add an option to select a protected devicet class for random selection
    https://github.com/dotnet/run…
  • PGO / device diagnosis improvement
    https://github.com/dotnet/run…

LSRA

  • Refactoring lsra inspired selection

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

  1. The debug mode contains a complus variable, and lsraordering will allow the user to set heuristic sorting
  2. The heuristic algorithm of adjusting registers to select the best register candidate to overflow

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

Improvements based on these changes:

Users of MacBook (M1 version) see that. Net 6 preview 6 supports Apple silicon for MacOS

Users of MacBook (M1 version) see that. Net 6 preview 6 supports Apple silicon for MacOS

Users of MacBook (M1 version) see that. Net 6 preview 6 supports Apple silicon for MacOS

More improvements:

  • Windows x86
  • Windows x64
  • General improvement

Code quality

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

summary

This release will be over soon. You can try the content changes mentioned in preview6 as soon as possible.

Thanks to everyone who contributed to the. Net 6 release. In the follow-up, grape city will continue to bring you more relevant content sharing of. Net6 updates.

Recommended Today

Monkey patch monkey patch programming method and its application in Ruby

What ismonkey patch (Monkey Patch)? In a dynamic language, functions are added and changed without modifying the source code. Purpose of using monkey patch:1. Additional function2. Function change3. Fix program errors4. Add a hook to execute some other processing while executing a method, such as printing logs, realizing AOP, etc,5. Cache, when the amount of […]