From 6283bd1cf4830d11b23412659ca76422cfe7f5ac Mon Sep 17 00:00:00 2001 From: Eric Erhardt Date: Thu, 14 May 2020 16:54:22 -0500 Subject: [PATCH] Remove references to PlatformAbstractions This will allow us to remove the PlatformAbstractions library from dotnet/runtime. Contributes to https://github.com/dotnet/runtime/issues/3470 --- dir.props | 21 ++++++-- src/application-insights | 1 + src/cli | 1 + src/cli-migrate | 1 + src/clicommandlineparser | 1 + src/common | 1 + src/core-setup | 1 + src/coreclr | 1 + src/corefx | 1 + src/fsharp | 1 + src/msbuild | 1 + src/newtonsoft-json | 1 + src/nuget-client | 1 + src/roslyn | 1 + src/roslyn-tools | 1 + src/sdk | 1 + src/standard | 1 + src/templating | 1 + src/vstest | 1 + src/websdk | 1 + src/xliff-tasks | 1 + tools-local/init-build.proj | 44 +-------------- .../GetHostInformation.cs | 52 ------------------ .../Microsoft.DotNet.SourceBuild.Tasks.csproj | 53 ------------------- .../Microsoft.DotNet.SourceBuild.Tasks/_._ | 0 25 files changed, 38 insertions(+), 152 deletions(-) create mode 160000 src/application-insights create mode 160000 src/cli create mode 160000 src/cli-migrate create mode 160000 src/clicommandlineparser create mode 160000 src/common create mode 160000 src/core-setup create mode 160000 src/coreclr create mode 160000 src/corefx create mode 160000 src/fsharp create mode 160000 src/msbuild create mode 160000 src/newtonsoft-json create mode 160000 src/nuget-client create mode 160000 src/roslyn create mode 160000 src/roslyn-tools create mode 160000 src/sdk create mode 160000 src/standard create mode 160000 src/templating create mode 160000 src/vstest create mode 160000 src/websdk create mode 160000 src/xliff-tasks delete mode 100644 tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks/GetHostInformation.cs delete mode 100755 tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks/Microsoft.DotNet.SourceBuild.Tasks.csproj delete mode 100644 tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks/_._ diff --git a/dir.props b/dir.props index 866121b859..a337e3b0db 100644 --- a/dir.props +++ b/dir.props @@ -68,8 +68,6 @@ $(DotNetCliToolDir)tools/ $([System.IO.File]::ReadAllText('$(ProjectDir)DarcVersion.txt').Trim()) $(DotNetCliToolDir)tools/.store/microsoft.dotnet.darc/$(DarcVersion)/microsoft.dotnet.darc/$(DarcVersion)/tools/netcoreapp3.0/any/Microsoft.DotNet.Darc.dll - $(TaskDirectory)Microsoft.DotNet.SourceBuild.Tasks/bin/Debug/netstandard2.0/ - $(TasksBinDir)Microsoft.DotNet.SourceBuild.Tasks.dll $(TaskDirectory)Microsoft.DotNet.SourceBuild.Tasks.XPlat/bin/Debug/netstandard2.0/ $(XPlatTasksBinDir)Microsoft.DotNet.SourceBuild.Tasks.XPlat.dll $(TaskDirectory)Microsoft.DotNet.SourceBuild.Tasks.LeakDetection/ @@ -93,7 +91,6 @@ $(LocalBlobStorageRoot)Toolset/ $(LocalBlobStorageRoot)Runtime/ $(LocalBlobStorageRoot)aspnetcore/Runtime/ - $(IntermediatePath)TargetInfo.props $(IntermediatePath)RestoreSources.props $(IntermediatePath)PackageVersions.props $(IntermediatePath)GennedPackageVersions.props @@ -154,10 +151,24 @@ ROOTFS_DIR=$(BaseIntermediatePath)crossrootfs/arm ROOTFS_DIR=$(BaseIntermediatePath)crossrootfs/armel - + - + + $([System.Runtime.InteropServices.RuntimeInformation]::RuntimeIdentifier) + Windows_NT + OSX + Linux + FreeBSD + + + + freebsd-$(Platform) + osx-$(Platform) + linux-$(Platform) + win-$(Platform) + + - true - - @@ -23,7 +18,7 @@ Inputs="$(TargetInfoProps)" Outputs="$(BuildCompetedSuccessSemaphore)" > - + @@ -51,13 +46,6 @@ - - - "$(ReferencePackagesDir)%3B$(PrebuiltPackagesPath)" - - - - "$(ReferencePackagesDir)%3B$(PrebuiltPackagesPath)" @@ -82,41 +70,13 @@ - - - - - - - - - - - freebsd-$(Platform) - osx-$(Platform) - linux-$(Platform) - win-$(Platform) - - - - <Project ToolsVersion="15.0"> - <PropertyGroup> - <TargetRid>$(TargetRid)</TargetRid> - <TargetOS>$(TargetOS)</TargetOS> - </PropertyGroup> -</Project> - - - - - diff --git a/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks/GetHostInformation.cs b/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks/GetHostInformation.cs deleted file mode 100644 index 48f6ebac4b..0000000000 --- a/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks/GetHostInformation.cs +++ /dev/null @@ -1,52 +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 System; -using System.IO; -using Microsoft.Build.Framework; -using Microsoft.Build.Utilities; -using Microsoft.DotNet.PlatformAbstractions; - -namespace Microsoft.DotNet.Build.Tasks -{ - /* - * Used vendored code from Microsoft.DotNet.PlatformAbstractions. - * Long term we should use that library once it is clear how to - * get MSBuild on core to be able to load the dependent assembly. - */ - public class GetHostInformation : Task - { - [Output] - public string Rid { get; set; } - - [Output] - public string OSName { get; set; } - - public override bool Execute() - { - Rid = RuntimeEnvironment.GetRuntimeIdentifier(); - - switch (RuntimeEnvironment.OperatingSystemPlatform) - { - case Platform.Windows: - OSName = "Windows_NT"; - break; - case Platform.Linux: - OSName = "Linux"; - break; - case Platform.Darwin: - OSName = "OSX"; - break; - case Platform.FreeBSD: - OSName = "FreeBSD"; - break; - default: - Log.LogError("Could not determine display name for platform."); - return false; - } - - return true; - } - } -} diff --git a/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks/Microsoft.DotNet.SourceBuild.Tasks.csproj b/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks/Microsoft.DotNet.SourceBuild.Tasks.csproj deleted file mode 100755 index 1be99d266d..0000000000 --- a/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks/Microsoft.DotNet.SourceBuild.Tasks.csproj +++ /dev/null @@ -1,53 +0,0 @@ - - - - true - - - - netstandard2.0 - true - $(ClonedSubmoduleDirectory)runtime.$(runtimeGitCommitHash)/src/installer/managed/Microsoft.DotNet.PlatformAbstractions/ - $(SubmoduleDirectory)runtime.$(runtimeGitCommitHash)/src/installer/managed/Microsoft.DotNet.PlatformAbstractions/ - $(MSBuildThisFileDirectory)bin/$(Configuration) - - - - - - - - - - - - - - 15.7.179 - - - 15.7.179 - - - 15.7.179 - - - 15.7.179 - - - - - - - - - - - - $(SdkReferenceDir)%(Identity).dll - - - diff --git a/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks/_._ b/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks/_._ deleted file mode 100644 index e69de29bb2..0000000000