mirror of https://github.com/dotnet/runtime
Update SDK and remove RID calculation in favor of RuntimeInformation (#35538)
* Remove GetTargetMachineInfo from runtime * Update bootstrapped SDK * Remove unused prop * Rename RuntimeRID to HostRuntimeIdentifier * Remove yml tmp copying * Update SDK * Move RuntimeOS into libraries * Fix RuntimeOS move
This commit is contained in:
parent
626819d31d
commit
a1af15d229
|
@ -29,7 +29,6 @@
|
||||||
<!-- Upfront restore hooks -->
|
<!-- Upfront restore hooks -->
|
||||||
<Import Project="$(RepositoryEngineeringDir)restore\docs.targets" Condition="'$(DotNetBuildFromSource)' != 'true'" />
|
<Import Project="$(RepositoryEngineeringDir)restore\docs.targets" Condition="'$(DotNetBuildFromSource)' != 'true'" />
|
||||||
<Import Project="$(RepositoryEngineeringDir)restore\optimizationData.targets" Condition="'$(DotNetBuildFromSource)' != 'true' and '$(EnableNgenOptimization)' == 'true'" />
|
<Import Project="$(RepositoryEngineeringDir)restore\optimizationData.targets" Condition="'$(DotNetBuildFromSource)' != 'true' and '$(EnableNgenOptimization)' == 'true'" />
|
||||||
<Import Project="$(RepositoryEngineeringDir)restore\runtimeprops.targets" />
|
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
Use synthetic inputs/outputs to avoid building it all the time. This should let devs build with
|
Use synthetic inputs/outputs to avoid building it all the time. This should let devs build with
|
||||||
|
|
|
@ -41,7 +41,6 @@
|
||||||
<InstallerTasksOutputPath>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'installer.tasks'))</InstallerTasksOutputPath>
|
<InstallerTasksOutputPath>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'installer.tasks'))</InstallerTasksOutputPath>
|
||||||
<InstallerTasksAssemblyPath Condition="'$(MSBuildRuntimeType)' == 'Core'">$([MSBuild]::NormalizePath('$(InstallerTasksOutputPath)', 'Debug', 'netstandard2.0', 'installer.tasks.dll'))</InstallerTasksAssemblyPath>
|
<InstallerTasksAssemblyPath Condition="'$(MSBuildRuntimeType)' == 'Core'">$([MSBuild]::NormalizePath('$(InstallerTasksOutputPath)', 'Debug', 'netstandard2.0', 'installer.tasks.dll'))</InstallerTasksAssemblyPath>
|
||||||
<InstallerTasksAssemblyPath Condition="'$(MSBuildRuntimeType)' != 'Core'">$([MSBuild]::NormalizePath('$(InstallerTasksOutputPath)', 'Debug', 'net46', 'installer.tasks.dll'))</InstallerTasksAssemblyPath>
|
<InstallerTasksAssemblyPath Condition="'$(MSBuildRuntimeType)' != 'Core'">$([MSBuild]::NormalizePath('$(InstallerTasksOutputPath)', 'Debug', 'net46', 'installer.tasks.dll'))</InstallerTasksAssemblyPath>
|
||||||
<HostMachineInfoProps>$(ArtifactsObjDir)HostMachineInfo.props</HostMachineInfoProps>
|
|
||||||
|
|
||||||
<DocsDir>$([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'docs'))</DocsDir>
|
<DocsDir>$([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'docs'))</DocsDir>
|
||||||
<ManPagesDir>$([MSBuild]::NormalizeDirectory('$(DocsDir)', 'manpages'))</ManPagesDir>
|
<ManPagesDir>$([MSBuild]::NormalizeDirectory('$(DocsDir)', 'manpages'))</ManPagesDir>
|
||||||
|
|
|
@ -13,7 +13,6 @@
|
||||||
<RepoTasksDir>$([MSBuild]::NormalizeDirectory('$(RepoToolsLocalDir)', 'tasks'))</RepoTasksDir>
|
<RepoTasksDir>$([MSBuild]::NormalizeDirectory('$(RepoToolsLocalDir)', 'tasks'))</RepoTasksDir>
|
||||||
<IbcOptimizationDataDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsDir)', 'ibc'))</IbcOptimizationDataDir>
|
<IbcOptimizationDataDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsDir)', 'ibc'))</IbcOptimizationDataDir>
|
||||||
<XmlDocDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'docs'))</XmlDocDir>
|
<XmlDocDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'docs'))</XmlDocDir>
|
||||||
<RuntimePropsFile>$([MSBuild]::NormalizePath('$(ArtifactsDir)', 'tmp', '$(Configuration)', 'RuntimeOS.props'))</RuntimePropsFile>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<!-- The TFMs to build and test against. -->
|
<!-- The TFMs to build and test against. -->
|
||||||
|
@ -38,6 +37,9 @@
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
|
<HostRuntimeIdentifier Condition="'$(HostRuntimeIdentifier)' == '' and '$(MSBuildRuntimeType)' == 'core'">$([System.Runtime.InteropServices.RuntimeInformation]::RuntimeIdentifier)</HostRuntimeIdentifier>
|
||||||
|
<HostRuntimeIdentifier Condition="'$(HostRuntimeIdentifier)' == '' and '$(MSBuildRuntimeType)' != 'core'">win-$([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture.ToString().ToLowerInvariant)</HostRuntimeIdentifier>
|
||||||
|
|
||||||
<TargetOS Condition="'$(TargetOS)' == '' and $([MSBuild]::IsOSPlatform('OSX'))">OSX</TargetOS>
|
<TargetOS Condition="'$(TargetOS)' == '' and $([MSBuild]::IsOSPlatform('OSX'))">OSX</TargetOS>
|
||||||
<TargetOS Condition="'$(TargetOS)' == '' and $([MSBuild]::IsOSPlatform('FREEBSD'))">FreeBSD</TargetOS>
|
<TargetOS Condition="'$(TargetOS)' == '' and $([MSBuild]::IsOSPlatform('FREEBSD'))">FreeBSD</TargetOS>
|
||||||
<TargetOS Condition="'$(TargetOS)' == '' and $([MSBuild]::IsOSPlatform('NETBSD'))">NetBSD</TargetOS>
|
<TargetOS Condition="'$(TargetOS)' == '' and $([MSBuild]::IsOSPlatform('NETBSD'))">NetBSD</TargetOS>
|
||||||
|
|
|
@ -460,7 +460,6 @@ jobs:
|
||||||
# independent installers on this leg, but we need to do it somewhere.)
|
# independent installers on this leg, but we need to do it somewhere.)
|
||||||
- template: steps/build-linux-package.yml
|
- template: steps/build-linux-package.yml
|
||||||
parameters:
|
parameters:
|
||||||
buildTraversalBuildDependencies: true
|
|
||||||
distroRid: ${{ packageBuild.imageRid }}
|
distroRid: ${{ packageBuild.imageRid }}
|
||||||
image: ${{ packageBuild.image }}
|
image: ${{ packageBuild.image }}
|
||||||
packageStepDescription: Runtime Deps, Runtime, Framework Packs installers
|
packageStepDescription: Runtime Deps, Runtime, Framework Packs installers
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
parameters:
|
parameters:
|
||||||
buildTraversalBuildDependencies: false
|
|
||||||
distroRid: null
|
distroRid: null
|
||||||
image: null
|
image: null
|
||||||
outputRidArg: ''
|
outputRidArg: ''
|
||||||
|
@ -8,18 +7,6 @@ parameters:
|
||||||
subsetArg: ''
|
subsetArg: ''
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- ${{ if eq(parameters.buildTraversalBuildDependencies, true) }}:
|
|
||||||
- script: |
|
|
||||||
set -x
|
|
||||||
df -h
|
|
||||||
$(DockerRunMSBuild) ${{ parameters.image }} $(MSBuildScript) \
|
|
||||||
--ci \
|
|
||||||
/root/runtime/tools-local/tasks/installer.tasks/installer.tasks.csproj \
|
|
||||||
/t:Restore /t:Build /t:CreateHostMachineInfoFile \
|
|
||||||
$(CommonMSBuildArgs) \
|
|
||||||
/bl:msbuild.${{ parameters.distroRid }}.traversaldependencies.binlog
|
|
||||||
displayName: ====== Build traversal build dependencies - ${{ parameters.distroRid }}
|
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
set -x
|
set -x
|
||||||
df -h
|
df -h
|
||||||
|
|
|
@ -157,12 +157,6 @@ jobs:
|
||||||
targetFolder: $(Build.ArtifactStagingDirectory)/artifacts/packages
|
targetFolder: $(Build.ArtifactStagingDirectory)/artifacts/packages
|
||||||
condition: and(succeeded(), eq(variables['_librariesBuildProducedPackages'], true))
|
condition: and(succeeded(), eq(variables['_librariesBuildProducedPackages'], true))
|
||||||
|
|
||||||
- task: CopyFiles@2
|
|
||||||
displayName: Prepare tmp assets to publish
|
|
||||||
inputs:
|
|
||||||
sourceFolder: $(Build.SourcesDirectory)/artifacts/tmp
|
|
||||||
targetFolder: $(Build.ArtifactStagingDirectory)/artifacts/tmp
|
|
||||||
|
|
||||||
- template: /eng/pipelines/common/upload-artifact-step.yml
|
- template: /eng/pipelines/common/upload-artifact-step.yml
|
||||||
parameters:
|
parameters:
|
||||||
rootFolder: $(Build.ArtifactStagingDirectory)/artifacts
|
rootFolder: $(Build.ArtifactStagingDirectory)/artifacts
|
||||||
|
|
|
@ -1,7 +0,0 @@
|
||||||
<Project Sdk="Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk">
|
|
||||||
|
|
||||||
<Target Name="GenerateRuntimeOSPropsFileBeforeRestore"
|
|
||||||
DependsOnTargets="GenerateRuntimeOSPropsFile"
|
|
||||||
BeforeTargets="Restore" />
|
|
||||||
|
|
||||||
</Project>
|
|
|
@ -1,11 +1,11 @@
|
||||||
{
|
{
|
||||||
"sdk": {
|
"sdk": {
|
||||||
"version": "5.0.100-preview.4.20202.8",
|
"version": "5.0.100-preview.5.20228.8",
|
||||||
"allowPrerelease": true,
|
"allowPrerelease": true,
|
||||||
"rollForward": "major"
|
"rollForward": "major"
|
||||||
},
|
},
|
||||||
"tools": {
|
"tools": {
|
||||||
"dotnet": "5.0.100-preview.4.20202.8"
|
"dotnet": "5.0.100-preview.5.20228.8"
|
||||||
},
|
},
|
||||||
"native-tools": {
|
"native-tools": {
|
||||||
"cmake": "3.14.2",
|
"cmake": "3.14.2",
|
||||||
|
|
|
@ -29,10 +29,6 @@
|
||||||
<SigningToolsDir>$(InstallerProjectRoot)signing\</SigningToolsDir>
|
<SigningToolsDir>$(InstallerProjectRoot)signing\</SigningToolsDir>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup>
|
|
||||||
<HostMachineInfoProps>$(ArtifactsObjDir)HostMachineInfo.props</HostMachineInfoProps>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<NETCoreAppFrameworkIdentifier>.NETCoreApp</NETCoreAppFrameworkIdentifier>
|
<NETCoreAppFrameworkIdentifier>.NETCoreApp</NETCoreAppFrameworkIdentifier>
|
||||||
<NETCoreAppFrameworkMoniker>$(NETCoreAppFrameworkIdentifier),Version=v$(NETCoreAppFrameworkVersion)</NETCoreAppFrameworkMoniker>
|
<NETCoreAppFrameworkMoniker>$(NETCoreAppFrameworkIdentifier),Version=v$(NETCoreAppFrameworkVersion)</NETCoreAppFrameworkMoniker>
|
||||||
|
@ -80,11 +76,8 @@
|
||||||
<ExeSuffix Condition="'$(TargetOS)' == 'Windows_NT'">.exe</ExeSuffix>
|
<ExeSuffix Condition="'$(TargetOS)' == 'Windows_NT'">.exe</ExeSuffix>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<Import Project="$(HostMachineInfoProps)"
|
<PropertyGroup Condition="'$(OutputRid)' == '' and '$(HostRuntimeIdentifier)' != ''">
|
||||||
Condition="Exists('$(HostMachineInfoProps)')" />
|
<OutputRid>$(HostRuntimeIdentifier.Remove($(HostRuntimeIdentifier.LastIndexOf('-'))))-$(TargetArchitecture)</OutputRid>
|
||||||
|
|
||||||
<PropertyGroup Condition="'$(OutputRid)' == '' and '$(HostMachineRid)' != ''">
|
|
||||||
<OutputRid>$(HostMachineRid.Remove($(HostMachineRid.LastIndexOf('-'))))-$(TargetArchitecture)</OutputRid>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<!-- Portable -->
|
<!-- Portable -->
|
||||||
|
@ -302,9 +295,9 @@
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(PortableBuild)' == 'true'">
|
<PropertyGroup Condition="'$(PortableBuild)' == 'true'">
|
||||||
<HostMachineRidTargetsDebianPackages Condition="
|
<HostMachineRidTargetsDebianPackages Condition="
|
||||||
$(HostMachineRid.StartsWith('debian')) or
|
$(HostRuntimeIdentifier.StartsWith('debian')) or
|
||||||
$(HostMachineRid.StartsWith('ubuntu')) or
|
$(HostRuntimeIdentifier.StartsWith('ubuntu')) or
|
||||||
$(HostMachineRid.StartsWith('linuxmint'))">true</HostMachineRidTargetsDebianPackages>
|
$(HostRuntimeIdentifier.StartsWith('linuxmint'))">true</HostMachineRidTargetsDebianPackages>
|
||||||
<!-- If the build machine isn't known to be Debian-based, try to build RPM packages. -->
|
<!-- If the build machine isn't known to be Debian-based, try to build RPM packages. -->
|
||||||
<HostMachineRidTargetsRpmPackages Condition="'$(HostMachineRidTargetsDebianPackages)' != 'true'">true</HostMachineRidTargetsRpmPackages>
|
<HostMachineRidTargetsRpmPackages Condition="'$(HostMachineRidTargetsDebianPackages)' != 'true'">true</HostMachineRidTargetsRpmPackages>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
|
@ -12,10 +12,8 @@
|
||||||
<!-- Provide default targets which can be hooked onto or overridden as necessary -->
|
<!-- Provide default targets which can be hooked onto or overridden as necessary -->
|
||||||
<Target Name="Pack" />
|
<Target Name="Pack" />
|
||||||
|
|
||||||
|
<!-- Remove after https://github.com/dotnet/arcade/pull/5365 is merged. -->
|
||||||
<UsingTask TaskName="GenerateGuidFromName" AssemblyFile="$(InstallerTasksAssemblyPath)" />
|
<UsingTask TaskName="GenerateGuidFromName" AssemblyFile="$(InstallerTasksAssemblyPath)" />
|
||||||
<UsingTask TaskName="GenerateMsiVersion" AssemblyFile="$(InstallerTasksAssemblyPath)" />
|
|
||||||
<UsingTask TaskName="GetTargetMachineInfo" AssemblyFile="$(InstallerTasksAssemblyPath)" />
|
|
||||||
<UsingTask TaskName="RegenerateReadmeTable" AssemblyFile="$(InstallerTasksAssemblyPath)" />
|
|
||||||
|
|
||||||
<!-- Common target to find all sfxproj. In a target to avoid evaluating for every project. -->
|
<!-- Common target to find all sfxproj. In a target to avoid evaluating for every project. -->
|
||||||
<Target Name="GetSharedFrameworkProjects">
|
<Target Name="GetSharedFrameworkProjects">
|
||||||
|
|
|
@ -112,6 +112,7 @@
|
||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
<UsingTask TaskName="GenerateCurrentVersion" AssemblyFile="$(InstallerTasksAssemblyPath)" />
|
<UsingTask TaskName="GenerateCurrentVersion" AssemblyFile="$(InstallerTasksAssemblyPath)" />
|
||||||
|
<UsingTask TaskName="GenerateMsiVersion" AssemblyFile="$(InstallerTasksAssemblyPath)" />
|
||||||
|
|
||||||
<Target Name="GenerateMsiVersionString">
|
<Target Name="GenerateMsiVersionString">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
|
|
|
@ -121,12 +121,8 @@
|
||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
<Target Name="DetermineTestOutputDirectory">
|
<Target Name="DetermineTestOutputDirectory">
|
||||||
<GetTargetMachineInfo>
|
|
||||||
<Output TaskParameter="RuntimeIdentifier" PropertyName="_HostRid" />
|
|
||||||
</GetTargetMachineInfo>
|
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TestTargetRid Condition="'$(TestTargetRid)' == ''">$(_HostRid)</TestTargetRid>
|
<TestTargetRid Condition="'$(TestTargetRid)' == ''">$(HostRuntimeIdentifier)</TestTargetRid>
|
||||||
<TestsOutputName Condition="'$(TestsOutputName)' == ''">$(MSBuildProjectName)</TestsOutputName>
|
<TestsOutputName Condition="'$(TestsOutputName)' == ''">$(MSBuildProjectName)</TestsOutputName>
|
||||||
|
|
||||||
<TestsOutputRootDir Condition="'$(TestsOutputRootDir)' == ''">$(ArtifactsDir)tests/$(Configuration)/</TestsOutputRootDir>
|
<TestsOutputRootDir Condition="'$(TestsOutputRootDir)' == ''">$(ArtifactsDir)tests/$(Configuration)/</TestsOutputRootDir>
|
||||||
|
|
|
@ -26,7 +26,9 @@
|
||||||
<GeneratePlatformNotSupportedAssemblyHeaderFile>$(RepositoryEngineeringDir)LicenseHeader.txt</GeneratePlatformNotSupportedAssemblyHeaderFile>
|
<GeneratePlatformNotSupportedAssemblyHeaderFile>$(RepositoryEngineeringDir)LicenseHeader.txt</GeneratePlatformNotSupportedAssemblyHeaderFile>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<Import Project="$(RuntimePropsFile)" Condition="Exists('$(RuntimePropsFile)')"/>
|
<PropertyGroup>
|
||||||
|
<RuntimeOS Condition="'$(RuntimeOS)' == '' and '$(HostRuntimeIdentifier)' != ''">$(HostRuntimeIdentifier.Remove($(HostRuntimeIdentifier.LastIndexOf('-'))))</RuntimeOS>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
<Import Sdk="Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk" Project="Sdk.props" />
|
<Import Sdk="Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk" Project="Sdk.props" />
|
||||||
|
|
||||||
|
|
|
@ -62,18 +62,10 @@ package() {
|
||||||
shift
|
shift
|
||||||
|
|
||||||
containerized "$image" bash -c "
|
containerized "$image" bash -c "
|
||||||
eng/common/msbuild.sh \
|
|
||||||
tools-local/tasks/installer.tasks/installer.tasks.csproj \
|
|
||||||
/t:Restore /t:Build /t:CreateHostMachineInfoFile \
|
|
||||||
/p:Configuration=Release \
|
|
||||||
/p:TargetOS=Linux \
|
|
||||||
/p:PortableBuild=false \
|
|
||||||
/p:TargetArchitecture=x64 \
|
|
||||||
/bl:artifacts/msbuild.$name.traversaldependencies.binlog;
|
|
||||||
./build.sh \
|
./build.sh \
|
||||||
--ci \
|
--ci \
|
||||||
|
--subset installer
|
||||||
/p:OfficialBuildId=20190101.1 \
|
/p:OfficialBuildId=20190101.1 \
|
||||||
/p:Subset=Installer \
|
|
||||||
/p:UsePrebuiltPortableBinariesForInstallers=true \
|
/p:UsePrebuiltPortableBinariesForInstallers=true \
|
||||||
/p:SharedFrameworkPublishDir=/work/artifacts/obj/linux-x64.Release/sharedFrameworkPublish/ \
|
/p:SharedFrameworkPublishDir=/work/artifacts/obj/linux-x64.Release/sharedFrameworkPublish/ \
|
||||||
/p:InstallerSourceOSPlatformConfig=linux-x64.Release \
|
/p:InstallerSourceOSPlatformConfig=linux-x64.Release \
|
||||||
|
|
|
@ -1,67 +0,0 @@
|
||||||
// Licensed to the .NET Foundation under one or more agreements.
|
|
||||||
// The .NET Foundation licenses this file to you under the MIT license.
|
|
||||||
// See the LICENSE file in the project root for more information.
|
|
||||||
|
|
||||||
using Microsoft.Build.Framework;
|
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
|
|
||||||
namespace Microsoft.DotNet.Build.Tasks
|
|
||||||
{
|
|
||||||
public class GetTargetMachineInfo : BuildTask
|
|
||||||
{
|
|
||||||
[Output]
|
|
||||||
public string TargetOS { get; set; }
|
|
||||||
|
|
||||||
[Output]
|
|
||||||
public string TargetArch { get; set; }
|
|
||||||
|
|
||||||
[Output]
|
|
||||||
public string RuntimeIdentifier { get; set; }
|
|
||||||
|
|
||||||
public override bool Execute()
|
|
||||||
{
|
|
||||||
switch (RuntimeInformation.OSArchitecture)
|
|
||||||
{
|
|
||||||
case Architecture.X64:
|
|
||||||
TargetArch = "x64";
|
|
||||||
break;
|
|
||||||
case Architecture.X86:
|
|
||||||
TargetArch = "x86";
|
|
||||||
break;
|
|
||||||
case Architecture.Arm:
|
|
||||||
TargetArch = "arm";
|
|
||||||
break;
|
|
||||||
case Architecture.Arm64:
|
|
||||||
TargetArch = "arm64";
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
|
|
||||||
TargetOS = "Windows_NT";
|
|
||||||
else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
|
|
||||||
TargetOS = "Linux";
|
|
||||||
else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
|
|
||||||
TargetOS = "OSX";
|
|
||||||
else if (RuntimeInformation.IsOSPlatform(OSPlatform.Create("FREEBSD")))
|
|
||||||
TargetOS = "FreeBSD";
|
|
||||||
else if (RuntimeInformation.IsOSPlatform(OSPlatform.Create("NETBSD")))
|
|
||||||
TargetOS = "NetBSD";
|
|
||||||
|
|
||||||
RuntimeIdentifier = Microsoft.DotNet.PlatformAbstractions.RuntimeEnvironment.GetRuntimeIdentifier();
|
|
||||||
|
|
||||||
if (TargetArch == null)
|
|
||||||
{
|
|
||||||
Log.LogError("{0} is null", nameof(TargetArch));
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (TargetOS == null)
|
|
||||||
{
|
|
||||||
Log.LogError("{0} is null", nameof(TargetOS));
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,5 +1,4 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>netstandard2.0</TargetFrameworks>
|
<TargetFrameworks>netstandard2.0</TargetFrameworks>
|
||||||
<TargetFrameworks Condition="'$(OS)' == 'Windows_NT'">$(TargetFrameworks);net46</TargetFrameworks>
|
<TargetFrameworks Condition="'$(OS)' == 'Windows_NT'">$(TargetFrameworks);net46</TargetFrameworks>
|
||||||
|
@ -14,7 +13,6 @@
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.Extensions.DependencyModel" Version="$(MicrosoftExtensionsDependencyModelVersion)" />
|
<PackageReference Include="Microsoft.Extensions.DependencyModel" Version="$(MicrosoftExtensionsDependencyModelVersion)" />
|
||||||
<PackageReference Include="Microsoft.DotNet.PlatformAbstractions" Version="2.1.0" />
|
|
||||||
<PackageReference Include="NuGet.ProjectModel" Version="$(RefOnlyNugetProjectModelVersion)" />
|
<PackageReference Include="NuGet.ProjectModel" Version="$(RefOnlyNugetProjectModelVersion)" />
|
||||||
<PackageReference Include="NuGet.Packaging" Version="$(RefOnlyNugetPackagingVersion)" />
|
<PackageReference Include="NuGet.Packaging" Version="$(RefOnlyNugetPackagingVersion)" />
|
||||||
<PackageReference Include="System.Reflection.Metadata" Version="1.7.0" />
|
<PackageReference Include="System.Reflection.Metadata" Version="1.7.0" />
|
||||||
|
@ -44,28 +42,4 @@
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Otherwise>
|
</Otherwise>
|
||||||
</Choose>
|
</Choose>
|
||||||
|
|
||||||
<UsingTask TaskName="GetTargetMachineInfo"
|
|
||||||
AssemblyFile="$(InstallerTasksAssemblyPath)" />
|
|
||||||
<Target Name="CreateHostMachineInfoFile"
|
|
||||||
AfterTargets="DispatchToInnerBuilds">
|
|
||||||
<GetTargetMachineInfo>
|
|
||||||
<Output PropertyName="HostMachineRid" TaskParameter="RuntimeIdentifier" />
|
|
||||||
</GetTargetMachineInfo>
|
|
||||||
|
|
||||||
<PropertyGroup>
|
|
||||||
<HostMachineInfoPropsContent>
|
|
||||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
||||||
<PropertyGroup>
|
|
||||||
<HostMachineRid>$(HostMachineRid)</HostMachineRid>
|
|
||||||
</PropertyGroup>
|
|
||||||
</Project>
|
|
||||||
</HostMachineInfoPropsContent>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<WriteLinesToFile File="$(HostMachineInfoProps)"
|
|
||||||
Lines="$(HostMachineInfoPropsContent)"
|
|
||||||
Overwrite="True" />
|
|
||||||
</Target>
|
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|
Loading…
Reference in New Issue