Skip to content

Commit

Permalink
Respect TPI in targetOS calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
am11 committed Feb 24, 2023
1 parent 0bf5e73 commit bf36e14
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@

<PropertyGroup Condition="'$(RuntimeIdentifier)' != '' and '$(NETCoreSdkPortableRuntimeIdentifier)' != ''">
<!-- Define the name of the runtime specific compiler package to import -->
<_targetOS>$(NETCoreSdkPortableRuntimeIdentifier.SubString(0, $(NETCoreSdkPortableRuntimeIdentifier.IndexOf('-'))))</_targetOS>
<_indexOfPeriod>$(_targetOS.IndexOf('.'))</_indexOfPeriod>
<_targetOS Condition="'$(_indexOfPeriod)' &gt; -1">$(_targetOS.SubString(0, $(_indexOfPeriod)))</_targetOS>
<_useTPI Condition="'$(TargetPlatformIdentifier)' != '' and '$(TargetPlatformIdentifier)' != 'unix'">true</_useTPI>
<_targetOS Condition="'$(_useTPI)' == 'true'">$(TargetPlatformIdentifier.ToLowerInvariant())</_targetOS>
<_targetOS Condition="'$(_useTPI)' != 'true'">$(NETCoreSdkPortableRuntimeIdentifier.SubString(0, $(NETCoreSdkPortableRuntimeIdentifier.IndexOf('-'))))</_targetOS>
<_indexOfPeriod Condition="'$(_useTPI)' != 'true'">$(_targetOS.IndexOf('.'))</_indexOfPeriod>
<_targetOS Condition="'$(_useTPI)' != 'true' and '$(_indexOfPeriod)' &gt; -1">$(_targetOS.SubString(0, $(_indexOfPeriod)))</_targetOS>
<_targetOS Condition="$(_targetOS.StartsWith('win'))">win</_targetOS>

<!-- Determine _hostArchitecture from NETCoreSdkPortableRuntimeIdentifier -->
Expand Down

0 comments on commit bf36e14

Please sign in to comment.