Set PortableBuild correctly for non source-only builds (#18474)

This commit is contained in:
Viktor Hofer 2024-01-31 17:12:43 +01:00 committed by GitHub
parent 6e4a053968
commit d0f4aa844a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -47,6 +47,9 @@
<HostRid Condition="'$(HostRid)' == ''">$(BuildRid)</HostRid>
<TargetRid Condition="'$(TargetRid)' == ''">$(BuildRid)</TargetRid>
<!-- Source-only builds are non portable. -->
<PortableBuild Condition="'$(PortableBuild)' == '' and '$(DotNetBuildSourceOnly)' != 'true'">true</PortableBuild>
<PortableRid Condition="'$(__PortableTargetOS)' != ''">$(__PortableTargetOS)-$(TargetArchitecture)</PortableRid>
<PortableRid Condition="'$(PortableRid)' == '' and '$(TargetOS)' == 'freebsd'">freebsd-$(TargetArchitecture)</PortableRid>
<PortableRid Condition="'$(PortableRid)' == '' and '$(TargetOS)' == 'osx'">osx-$(TargetArchitecture)</PortableRid>