Skip to content

Commit

Permalink
Fix NativeAOT publish failure on fi_FI culture (dotnet#98552)
Browse files Browse the repository at this point in the history
This culture uses `U+2212 : MINUS SIGN` instead of `-` for negative numbers which trips up msbuild when comparing the property.
Instead of using an intermediate property just inline the usage and use `Contains()` for better readability.

Fixes dotnet#98550
  • Loading branch information
akoeplinger authored Feb 17, 2024
1 parent cc89d7d commit c768315
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
<_hostOS>$(NETCoreSdkPortableRuntimeIdentifier.SubString(0, $(NETCoreSdkPortableRuntimeIdentifier.LastIndexOf('-'))))</_hostOS>

<_originalTargetOS>$(RuntimeIdentifier.SubString(0, $(RuntimeIdentifier.LastIndexOf('-'))))</_originalTargetOS>
<_indexOfPeriod>$(_originalTargetOS.IndexOf('.'))</_indexOfPeriod>
<_originalTargetOS Condition="'$(_indexOfPeriod)' &gt; -1">$(_originalTargetOS.SubString(0, $(_indexOfPeriod)))</_originalTargetOS>
<_originalTargetOS Condition="$(_originalTargetOS.Contains('.'))">$(_originalTargetOS.SubString(0, $(_originalTargetOS.IndexOf('.')))</_originalTargetOS>
<_originalTargetOS Condition="$(_originalTargetOS.StartsWith('win'))">win</_originalTargetOS>

<!-- On non-Windows, determine _hostArchitecture from NETCoreSdkPortableRuntimeIdentifier -->
Expand Down

0 comments on commit c768315

Please sign in to comment.