Skip to content

Commit

Permalink
Fix NativeAOT publish failure on fi_FI culture (#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 #98550
  • Loading branch information
akoeplinger authored and pull[bot] committed Jul 26, 2024
1 parent 2f310c7 commit 3037911
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 3037911

Please sign in to comment.