[release/6.0] Tools: Target .NET 6 to improve compatibility with osx-arm64 #27807
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
For tools targeting versions below 6.0, the
dotnet tool install
command creates an x64 shim. When users try to rundotnet ef
, it errors with The required library libhostfxr.dylib could not be found.For tools targeting 6.0 or higher, it will generate an arm64 shim. This enables the tool to work as expected.
Fixes #27787, fixes #27827
Customer impact
Without this, users are required to specify
-a arm64
when installing the tool on osx-arm64 before it will work.Regression?
Sort of. The
dotnet tool install
behavior changed in 6.0.1 causing our tool to stop working.Risk
Low. EF Core 6.0 already requires .NET 6.0, so users already have it installed, and because we specify RollForward= Major, it's already being used to run dotnet-ef.