Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c768315

Browse files
authored
Fix NativeAOT publish failure on fi_FI culture (#98552)
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
1 parent cc89d7d commit c768315

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/coreclr/nativeaot/BuildIntegration/Microsoft.DotNet.ILCompiler.SingleEntry.targets

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
<_hostOS>$(NETCoreSdkPortableRuntimeIdentifier.SubString(0, $(NETCoreSdkPortableRuntimeIdentifier.LastIndexOf('-'))))</_hostOS>
66

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

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

0 commit comments

Comments
 (0)