Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[release/6.0] Tools: Target .NET 6 to improve compatibility with osx-arm64 #27807

Merged
merged 1 commit into from
May 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/dotnet-ef/dotnet-ef.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ dotnet ef dbcontext scaffold
dotnet ef database drop
dotnet ef database update
</Description>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
bricelam marked this conversation as resolved.
Show resolved Hide resolved
<OutputType>Exe</OutputType>
<PackAsTool>true</PackAsTool>
<PackAsToolShimRuntimeIdentifiers>win-x64;win-x86</PackAsToolShimRuntimeIdentifiers>
<PackAsToolShimRuntimeIdentifiers>win-x64;win-x86;win-arm64</PackAsToolShimRuntimeIdentifiers>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also not related to osx-arm64, but allows us to codesign a win-arm64 shim.

<!-- Because this project uses a custom nuspec, this is necessary to ensure the generated shims are in the publish directory. -->
<PackagedShimOutputRootDirectory>$(OutDir)</PackagedShimOutputRootDirectory>
<RootNamespace>Microsoft.EntityFrameworkCore.Tools</RootNamespace>
Expand Down
1 change: 1 addition & 0 deletions src/ef/ef.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<RootNamespace>Microsoft.EntityFrameworkCore.Tools</RootNamespace>
<CheckEolTargetFramework>False</CheckEolTargetFramework>
<CodeAnalysisRuleSet>$(MSBuildThisFileDirectory)..\..\rulesets\EFCore.noxmldocs.ruleset</CodeAnalysisRuleSet>
<RollForward>Major</RollForward>
Copy link
Contributor Author

@bricelam bricelam Apr 12, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change isn't really related to the M1 issues. It's a cherry-pick from main of PR #27671.

It helps in a few corner cases where dotnet-ef can't determine a project's target framework. On other platforms, the workaround is to install an older version of the runtime. But on osx-arm64, there is no workaround since that older version isn't available.

We've had a fair amount of users hit this on other platforms, and I suspect that once we unblock osx-arm64 we'll see a few more reports from those users who won't be able to work around it. It seems prudent to me to eagerly fix this now as part of this change rather than making users wait a few more months for another patch.

</PropertyGroup>

<ItemGroup>
Expand Down