Skip to content

Commit

Permalink
Fix NativeAOT publish failure on fi_FI culture (#98552) (#98601)
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

(cherry picked from commit c768315)
  • Loading branch information
akoeplinger authored Feb 20, 2024
1 parent 91b2946 commit fe2ea4e
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>

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

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

0 comments on commit fe2ea4e

Please sign in to comment.