Skip to content

Commit 0a0901b

Browse files
authored
Merge pull request #19052 from sfoslund/ImplicitRid
Set pre-net5 win-arm64 to x64 by default
2 parents 8b53b80 + 6ad5f36 commit 0a0901b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.RuntimeIdentifierInference.targets

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,10 @@ Copyright (c) .NET Foundation. All rights reserved.
137137
<DefaultAppHostRuntimeIdentifier Condition="$(DefaultAppHostRuntimeIdentifier.EndsWith('arm64')) and
138138
$(DefaultAppHostRuntimeIdentifier.StartsWith('osx')) and
139139
$([MSBuild]::VersionLessThan('$(_TargetFrameworkVersionWithoutV)', '6.0'))">$(DefaultAppHostRuntimeIdentifier.Replace("arm64", "x64"))</DefaultAppHostRuntimeIdentifier>
140+
<!-- If we are running on win-arm64 and the TFM is < 5.0, we have to use a x64 apphost since there are no win-arm64 apphosts previous to .NET 5.0. -->
141+
<DefaultAppHostRuntimeIdentifier Condition="$(DefaultAppHostRuntimeIdentifier.EndsWith('arm64')) and
142+
$(DefaultAppHostRuntimeIdentifier.StartsWith('win')) and
143+
$([MSBuild]::VersionLessThan('$(_TargetFrameworkVersionWithoutV)', '5.0'))">$(DefaultAppHostRuntimeIdentifier.Replace("arm64", "x64"))</DefaultAppHostRuntimeIdentifier>
140144
</PropertyGroup>
141145

142146
<Target Name="_CheckForUnsupportedAppHostUsage"

0 commit comments

Comments
 (0)