|
| 1 | +<Project> |
| 2 | + |
| 3 | + <Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../'))" /> |
| 4 | + |
| 5 | + <PropertyGroup> |
| 6 | + <!-- Use current machine distro RID if set. Otherwise, fall back to RuntimeInformation.RuntimeIdentifier --> |
| 7 | + <HostRid Condition="'$(HostRid)' == '' and '$(MSBuildRuntimeType)' == 'core'">$(__DistroRid)</HostRid> |
| 8 | + <HostRid Condition="'$(HostRid)' == '' and '$(MSBuildRuntimeType)' == 'core'">$([System.Runtime.InteropServices.RuntimeInformation]::RuntimeIdentifier)</HostRid> |
| 9 | + <HostRid Condition="'$(HostRid)' == '' and '$(MSBuildRuntimeType)' != 'core'">win-$([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture.ToString().ToLowerInvariant)</HostRid> |
| 10 | + |
| 11 | + <IsDebianBaseDistro Condition="$(HostRid.StartsWith('ubuntu')) or $(HostRid.StartsWith('debian'))">true</IsDebianBaseDistro> |
| 12 | + <IsRPMBasedDistro Condition="$(HostRid.StartsWith('rhel'))">true</IsRPMBasedDistro> |
| 13 | + <IsRPMBasedDistro Condition="$(HostRid.StartsWith('centos'))">true</IsRPMBasedDistro> |
| 14 | + </PropertyGroup> |
| 15 | + |
| 16 | + <PropertyGroup> |
| 17 | + <ArchiveExtension>.tar.gz</ArchiveExtension> |
| 18 | + <ArchiveExtension Condition="$([MSBuild]::IsOSPlatform('WINDOWS'))">.zip</ArchiveExtension> |
| 19 | + |
| 20 | + <InstallerExtension Condition="$([MSBuild]::IsOSPlatform('WINDOWS'))">.msi</InstallerExtension> |
| 21 | + <InstallerExtension Condition="$([MSBuild]::IsOSPlatform('OSX'))">.pkg</InstallerExtension> |
| 22 | + <InstallerExtension Condition="'$(IsDebianBaseDistro)' == 'true'">.deb</InstallerExtension> |
| 23 | + <InstallerExtension Condition="'$(IsRPMBasedDistro)' == 'true'">.rpm</InstallerExtension> |
| 24 | + |
| 25 | + <BundleExtension Condition="$([MSBuild]::IsOSPlatform('WINDOWS'))">.exe</BundleExtension> |
| 26 | + <BundleExtension Condition="$([MSBuild]::IsOSPlatform('OSX'))">$(InstallerExtension)</BundleExtension> |
| 27 | + <BundleExtension Condition="'$(IsDebianBaseDistro)' == 'true'">$(InstallerExtension)</BundleExtension> |
| 28 | + <BundleExtension Condition="'$(IsRPMBasedDistro)' == 'true'">$(InstallerExtension)</BundleExtension> |
| 29 | + |
| 30 | + <ExeExtension>.exe</ExeExtension> |
| 31 | + <ExeExtension Condition="!$([MSBuild]::IsOSPlatform('WINDOWS'))"></ExeExtension> |
| 32 | + |
| 33 | + <Rid>$(OSName)-$(Architecture)</Rid> |
| 34 | + <ProductMonikerRid Condition="'$(ProductMonikerRid)' == ''">$(Rid)</ProductMonikerRid> |
| 35 | + |
| 36 | + <PortableOSName Condition="'$(PortableOSName)' == ''">$(OSName)</PortableOSName> |
| 37 | + <PortableRid>$(PortableOSName)-$(Architecture)</PortableRid> |
| 38 | + <PortableProductMonikerRid Condition="'$(PortableProductMonikerRid)' == ''">$(PortableRid)</PortableProductMonikerRid> |
| 39 | + </PropertyGroup> |
| 40 | + |
| 41 | + <PropertyGroup> |
| 42 | + <SkipBuildingInstallers Condition="'$(OS)' == 'Windows_NT' and '$(Architecture)' == 'arm'">true</SkipBuildingInstallers> |
| 43 | + <SkipBuildingInstallers Condition="'$(DotNetBuildSourceOnly)' == 'true'">true</SkipBuildingInstallers> |
| 44 | + <SkipBuildingInstallers Condition="'$(PgoInstrument)' == 'true'">true</SkipBuildingInstallers> |
| 45 | + <SkipBuildingInstallers Condition=" |
| 46 | + ( |
| 47 | + $(Rid.StartsWith('freebsd')) or |
| 48 | + $(Rid.StartsWith('illumos')) or |
| 49 | + $(Rid.StartsWith('linux-musl')) |
| 50 | + )">true</SkipBuildingInstallers> |
| 51 | + </PropertyGroup> |
| 52 | + |
| 53 | + <PropertyGroup> |
| 54 | + <GenerateSdkBundleOnly Condition="'$(DotNetBuildPass)' == '2' and '$(OS)' == 'Windows_NT'">true</GenerateSdkBundleOnly> |
| 55 | + <BundleRuntimePacks Condition="'$(BundleRuntimePacks)' == '' and '$(DotNetBuildSourceOnly)' == 'true'">true</BundleRuntimePacks> |
| 56 | + <BundleNativeAotCompiler Condition="'$(BundleNativeAotCompiler)' == '' and '$(DotNetBuildSourceOnly)' == 'true' and '$(DotNetBuildUseMonoRuntime)' != 'true'">true</BundleNativeAotCompiler> |
| 57 | + |
| 58 | + <!-- Use the portable "linux-x64" Rid when downloading Linux shared framework compressed file. --> |
| 59 | + <UsePortableLinuxSharedFramework Condition="'$(UsePortableLinuxSharedFramework)' == '' and '$(IsLinux)' == 'true' and !$(Rid.StartsWith('linux-musl'))">true</UsePortableLinuxSharedFramework> |
| 60 | + <HighEntropyVA>true</HighEntropyVA> |
| 61 | + </PropertyGroup> |
| 62 | + |
| 63 | + <PropertyGroup> |
| 64 | + <NetRuntimeRid Condition="'$(NetRuntimeRid)' == ''">$(HostRid)</NetRuntimeRid> |
| 65 | + <NetRuntimeRid Condition="('$(OSName)' == 'win' or '$(OSName)' == 'osx' or '$(OSName)' == 'freebsd' or '$(OSName)' == 'illumos' or '$(OSName)' == 'solaris') and '$(DotNetBuildSourceOnly)' != 'true'">$(OSName)-$(Architecture)</NetRuntimeRid> |
| 66 | + <NetRuntimeRid Condition="'$(DotNetBuild)' != 'true' and $(NetRuntimeRid.StartsWith('mariner.2.0'))">$(HostRid.Replace('mariner.2.0', 'cm.2'))</NetRuntimeRid> |
| 67 | + |
| 68 | + <SharedFrameworkRid>$(NetRuntimeRid)</SharedFrameworkRid> |
| 69 | + <SharedFrameworkRid Condition="$(ProductMonikerRid.StartsWith('linux-musl'))">$(ProductMonikerRid)</SharedFrameworkRid> |
| 70 | + <SharedFrameworkRid Condition=" '$(UsePortableLinuxSharedFramework)' == 'true' ">linux-$(Architecture)</SharedFrameworkRid> |
| 71 | + </PropertyGroup> |
| 72 | + |
| 73 | +</Project> |
0 commit comments