Skip to content

Commit 46b430a

Browse files
authored
Remove Microsoft.DotNet.PlatformAbstractions (#36707)
* Remove Microsoft.DotNet.PlatformAbstractions This library overlapped with other System APIs and is now obsolete. For API replacement: ApplicationEnvironment.ApplicationBasePath => AppContext.BaseDirectory HashCodeCombiner => System.HashCode RuntimeEnvironment.GetRuntimeIdentifier() => RuntimeInformation.RuntimeIdentifier RuntimeEnvironment.OperatingSystemPlatform => RuntimeInformation.IsOSPlatform(OSPlatform) RuntimeEnvironment.RuntimeArchitecture => RuntimeInformation.ProcessArchitecture RuntimeEnvironment.OperatingSystem => RuntimeInformation.OSDescription RuntimeEnvironment.OperatingSystemVersion => RuntimeInformation.OSDescription / Environment.OSVersion.Version Fix #3470
1 parent f95cdda commit 46b430a

File tree

22 files changed

+8
-678
lines changed

22 files changed

+8
-678
lines changed

eng/Signing.props

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@
7171
<ItemsToSign Include="$(BaseOutputRootPath)corehost/**/nethost.dll" />
7272

7373
<!-- Sign managed libraries in installer subset. -->
74-
<ItemsToSign Include="$(ArtifactsBinDir)Microsoft.DotNet.PlatformAbstractions/**/*.dll" />
7574
<ItemsToSign Include="$(ArtifactsBinDir)Microsoft.NET.HostModel/**/*.dll" />
7675
</ItemGroup>
7776

eng/Subsets.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
1414
./build.sh corehost installer.managed
1515
16-
This builds the CoreHost and also the Managed installer portion (e.g. Microsoft.DotNet.PlatformAbstractions)
16+
This builds the CoreHost and also the Managed installer portion (e.g. Microsoft.NET.HostModel)
1717
projects. A space ' ' or '+' are the delimiters between multiple subsets to build.
1818
1919
./build.sh -test installer.tests
@@ -104,7 +104,7 @@
104104
<!-- Installer -->
105105
<SubsetName Include="Installer" Description="The .NET Core hosts, hosting libraries, bundles, and installers. Includes these projects' tests." />
106106
<SubsetName Include="CoreHost" Description="The .NET Core hosts." />
107-
<SubsetName Include="Installer.Managed" Description="The managed .NET hosting projects. This includes PlatformAbstractions and HostModel." />
107+
<SubsetName Include="Installer.Managed" Description="The managed .NET hosting projects. This includes HostModel." />
108108
<SubsetName Include="Installer.DepProjs" Description="The dependency projects. These gather shared framework files and run crossgen on them to turn them into ready-to-run (R2R) assemblies for the current platform." />
109109
<SubsetName Include="Installer.PkgProjs" Description="The packaging projects. These produce NETCoreApp assets: NuGet packages, installers, zips, and Linux packages." />
110110
<SubsetName Include="Bundles" Description="The shared framework bundle installer projects. Produces .exe installers for Windows." />

eng/Versions.props

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,7 @@
6565
<MicrosoftNETCoreAppVersion>5.0.0-preview.4.20202.18</MicrosoftNETCoreAppVersion>
6666
<MicrosoftNETCoreDotNetHostVersion>5.0.0-preview.4.20202.18</MicrosoftNETCoreDotNetHostVersion>
6767
<MicrosoftNETCoreDotNetHostPolicyVersion>5.0.0-preview.4.20202.18</MicrosoftNETCoreDotNetHostPolicyVersion>
68-
<MicrosoftExtensionsDependencyModelVersion>2.1.0</MicrosoftExtensionsDependencyModelVersion>
69-
<MicrosoftDotNetPlatformAbstractionsVersion>3.0.0</MicrosoftDotNetPlatformAbstractionsVersion>
68+
<MicrosoftExtensionsDependencyModelVersion>3.1.0</MicrosoftExtensionsDependencyModelVersion>
7069
<!-- CoreClr dependencies -->
7170
<MicrosoftNETCoreILAsmVersion>5.0.0-preview.4.20202.18</MicrosoftNETCoreILAsmVersion>
7271
<MicrosoftNETSdkILVersion>5.0.0-preview.4.20202.18</MicrosoftNETSdkILVersion>

src/coreclr/src/System.Private.CoreLib/Tools/GenUnicodeProp/GenUnicodeProp.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@
4343
</ItemGroup>
4444

4545
<ItemGroup>
46-
<PackageReference Include="Microsoft.DotNet.PlatformAbstractions" Version="$(MicrosoftDotNetPlatformAbstractionsVersion)" />
4746
<PackageReference Include="Microsoft.DotNet.XUnitExtensions" Version="$(MicrosoftDotNetXUnitExtensionsVersion)" />
4847
<PackageReference Include="xunit.core" Version="$(XUnitVersion)" ExcludeAssets="build" />
4948
<PackageReference Include="xunit.assert" Version="$(XUnitVersion)" />

src/installer/Microsoft.DotNet.CoreSetup.sln

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
99
NuGet.Config = NuGet.Config
1010
EndProjectSection
1111
EndProject
12-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.PlatformAbstractions", "managed\Microsoft.DotNet.PlatformAbstractions\Microsoft.DotNet.PlatformAbstractions.csproj", "{04D84DC8-A509-43FE-B846-16B770D9E3AA}"
13-
EndProject
1412
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HostActivation.Tests", "test\HostActivation.Tests\HostActivation.Tests.csproj", "{23F4AB97-D15C-4C51-A641-DF5C5D5EF70F}"
1513
EndProject
1614
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestUtils", "test\TestUtils\TestUtils.csproj", "{D6676666-D14D-4DFA-88FB-76E3E823E2E1}"
@@ -41,22 +39,6 @@ Global
4139
RelWithDebInfo|x64 = RelWithDebInfo|x64
4240
EndGlobalSection
4341
GlobalSection(ProjectConfigurationPlatforms) = postSolution
44-
{04D84DC8-A509-43FE-B846-16B770D9E3AA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
45-
{04D84DC8-A509-43FE-B846-16B770D9E3AA}.Debug|Any CPU.Build.0 = Debug|Any CPU
46-
{04D84DC8-A509-43FE-B846-16B770D9E3AA}.Debug|x64.ActiveCfg = Debug|Any CPU
47-
{04D84DC8-A509-43FE-B846-16B770D9E3AA}.Debug|x64.Build.0 = Debug|Any CPU
48-
{04D84DC8-A509-43FE-B846-16B770D9E3AA}.MinSizeRel|Any CPU.ActiveCfg = Release|Any CPU
49-
{04D84DC8-A509-43FE-B846-16B770D9E3AA}.MinSizeRel|Any CPU.Build.0 = Release|Any CPU
50-
{04D84DC8-A509-43FE-B846-16B770D9E3AA}.MinSizeRel|x64.ActiveCfg = Release|Any CPU
51-
{04D84DC8-A509-43FE-B846-16B770D9E3AA}.MinSizeRel|x64.Build.0 = Release|Any CPU
52-
{04D84DC8-A509-43FE-B846-16B770D9E3AA}.Release|Any CPU.ActiveCfg = Release|Any CPU
53-
{04D84DC8-A509-43FE-B846-16B770D9E3AA}.Release|Any CPU.Build.0 = Release|Any CPU
54-
{04D84DC8-A509-43FE-B846-16B770D9E3AA}.Release|x64.ActiveCfg = Release|Any CPU
55-
{04D84DC8-A509-43FE-B846-16B770D9E3AA}.Release|x64.Build.0 = Release|Any CPU
56-
{04D84DC8-A509-43FE-B846-16B770D9E3AA}.RelWithDebInfo|Any CPU.ActiveCfg = Release|Any CPU
57-
{04D84DC8-A509-43FE-B846-16B770D9E3AA}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU
58-
{04D84DC8-A509-43FE-B846-16B770D9E3AA}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU
59-
{04D84DC8-A509-43FE-B846-16B770D9E3AA}.RelWithDebInfo|x64.Build.0 = Release|Any CPU
6042
{23F4AB97-D15C-4C51-A641-DF5C5D5EF70F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
6143
{23F4AB97-D15C-4C51-A641-DF5C5D5EF70F}.Debug|Any CPU.Build.0 = Debug|Any CPU
6244
{23F4AB97-D15C-4C51-A641-DF5C5D5EF70F}.Debug|x64.ActiveCfg = Debug|Any CPU

src/installer/corehost/cli/hostmisc/pal.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,6 @@ namespace pal
249249
inline void err_flush() { std::fflush(stderr); }
250250
inline void out_flush() { std::fflush(stdout); }
251251

252-
// Based upon https://github.com/dotnet/core-setup/blob/master/src/Microsoft.DotNet.PlatformAbstractions/Native/PlatformApis.cs
253252
string_t get_current_os_rid_platform();
254253
inline string_t get_current_os_fallback_rid()
255254
{

src/installer/managed/CommonManaged.props

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,6 @@
1616
<GenerateDocumentationFile>true</GenerateDocumentationFile>
1717
<!-- Managed API isn't completely documented yet. TODO: https://github.com/dotnet/core-setup/issues/5108 -->
1818
<NoWarn>$(NoWarn);CS1591</NoWarn>
19-
<!--
20-
Arcade specifies a default en-US NeutralLanguage, which creates a
21-
System.Resources.NeutralResourcesLanguageAttribute that doesn't compile with existing
22-
references for PlatformAbstractions on netstandard1.3. Clearing NeutralLanguage removes it.
23-
24-
If this Arcade SDK feature is desired in the future, this will need to be worked through. No
25-
issue tracks this as of writing.
26-
-->
27-
<NeutralLanguage></NeutralLanguage>
2819
</PropertyGroup>
2920

3021
<PropertyGroup>
@@ -34,20 +25,6 @@
3425
<PublicSign Condition=" '$(OS)' != 'Windows_NT' ">true</PublicSign>
3526
</PropertyGroup>
3627

37-
<PropertyGroup Condition=" '$(TargetFramework)' != 'netstandard2.0' And '$(TargetFramework)' != 'netcoreapp2.0' ">
38-
<DisableImplicitFrameworkReferences>true</DisableImplicitFrameworkReferences>
39-
</PropertyGroup>
40-
41-
<PropertyGroup>
42-
<RepositoryType>git</RepositoryType>
43-
<RepositoryUrl>git://github.com/dotnet/core-setup</RepositoryUrl>
44-
</PropertyGroup>
45-
46-
<ItemGroup Condition=" '$(TargetFrameworkIdentifier)' == '.NETFramework' ">
47-
<Reference Include="System" />
48-
<Reference Include="System.Core" />
49-
</ItemGroup>
50-
5128
<!-- Add required legal files to packages -->
5229
<ItemGroup>
5330
<Content Condition="Exists('$(NugetLicenseFile)')"

src/installer/managed/Microsoft.DotNet.PlatformAbstractions/ApplicationEnvironment.cs

Lines changed: 0 additions & 26 deletions
This file was deleted.

src/installer/managed/Microsoft.DotNet.PlatformAbstractions/HashCodeCombiner.cs

Lines changed: 0 additions & 59 deletions
This file was deleted.

src/installer/managed/Microsoft.DotNet.PlatformAbstractions/Microsoft.DotNet.PlatformAbstractions.csproj

Lines changed: 0 additions & 30 deletions
This file was deleted.

0 commit comments

Comments
 (0)