[release/6.0] Bring back System.Security.AccessControl package (#57816)
authorViktor Hofer <viktor.hofer@microsoft.com>
Wed, 1 Sep 2021 13:40:46 +0000 (15:40 +0200)
committerGitHub <noreply@github.com>
Wed, 1 Sep 2021 13:40:46 +0000 (15:40 +0200)
* Bring back System.Threading.AccessControl pkg

Fixes https://github.com/dotnet/runtime/issues/54341

* Fix S.Security.Permissions dependencies

* Fix .NETFramework configurations

* Add ILLink Descriptors file to workaround Trimmer removing an interface from a type

* add .LibraryBuild suffix to descriptors file

Co-authored-by: Jose Perez Rodriguez <joperezr@microsoft.com>
37 files changed:
src/libraries/Microsoft.Diagnostics.Tracing.EventSource.Redist/src/Microsoft.Diagnostics.Tracing.EventSource.Redist.csproj
src/libraries/Microsoft.Diagnostics.Tracing.EventSource.Redist/tests/Microsoft.Diagnostics.Tracing.EventSource.Redist.Tests.csproj
src/libraries/Microsoft.Extensions.Configuration.Xml/src/Microsoft.Extensions.Configuration.Xml.csproj
src/libraries/Microsoft.Extensions.Configuration.Xml/tests/Microsoft.Extensions.Configuration.Xml.Tests.csproj
src/libraries/Microsoft.Extensions.Configuration/tests/FunctionalTests/Microsoft.Extensions.Configuration.Functional.Tests.csproj
src/libraries/Microsoft.NETCore.Platforms/tests/Microsoft.NETCore.Platforms.Tests.csproj
src/libraries/Microsoft.VisualBasic.Core/tests/Microsoft.VisualBasic.Core.Tests.csproj
src/libraries/Microsoft.Win32.Registry.AccessControl/ref/Microsoft.Win32.Registry.AccessControl.csproj
src/libraries/Microsoft.Win32.Registry.AccessControl/src/Microsoft.Win32.Registry.AccessControl.csproj
src/libraries/Microsoft.Win32.SystemEvents/tests/Microsoft.Win32.SystemEvents.Tests.csproj
src/libraries/Microsoft.Windows.Compatibility/src/Microsoft.Windows.Compatibility.csproj
src/libraries/System.Configuration.ConfigurationManager/src/System.Configuration.ConfigurationManager.csproj
src/libraries/System.Configuration.ConfigurationManager/tests/System.Configuration.ConfigurationManager.Tests.csproj
src/libraries/System.Data.Odbc/src/System.Data.Odbc.csproj
src/libraries/System.Data.OleDb/ref/System.Data.OleDb.csproj
src/libraries/System.Data.OleDb/src/System.Data.OleDb.csproj
src/libraries/System.DirectoryServices.AccountManagement/src/System.DirectoryServices.AccountManagement.csproj
src/libraries/System.DirectoryServices/ref/System.DirectoryServices.csproj
src/libraries/System.DirectoryServices/src/System.DirectoryServices.csproj
src/libraries/System.Security.AccessControl/NuGet.config [new file with mode: 0644]
src/libraries/System.Security.AccessControl/ref/System.Security.AccessControl.Evidence.cs [deleted file]
src/libraries/System.Security.AccessControl/ref/System.Security.AccessControl.cs
src/libraries/System.Security.AccessControl/ref/System.Security.AccessControl.csproj
src/libraries/System.Security.AccessControl/ref/System.Security.AccessControl.net461.cs [new file with mode: 0644]
src/libraries/System.Security.AccessControl/src/CompatibilitySuppressions.xml [new file with mode: 0644]
src/libraries/System.Security.AccessControl/src/ILLink/ILLink.Descriptors.LibraryBuild.xml [new file with mode: 0644]
src/libraries/System.Security.AccessControl/src/System.Security.AccessControl.csproj
src/libraries/System.Security.Cryptography.Xml/src/System.Security.Cryptography.Xml.csproj
src/libraries/System.Security.Cryptography.Xml/tests/System.Security.Cryptography.Xml.Tests.csproj
src/libraries/System.Security.Permissions/ref/System.Security.Permissions.Forwards.cs
src/libraries/System.Security.Permissions/ref/System.Security.Permissions.csproj
src/libraries/System.Security.Permissions/src/CompatibilitySuppressions.xml
src/libraries/System.Security.Permissions/src/System.Security.Permissions.csproj
src/libraries/System.ServiceModel.Syndication/tests/System.ServiceModel.Syndication.Tests.csproj
src/libraries/System.ServiceProcess.ServiceController/tests/System.ServiceProcess.ServiceController.TestService/System.ServiceProcess.ServiceController.TestService.csproj
src/libraries/System.Threading.AccessControl/ref/System.Threading.AccessControl.csproj
src/libraries/System.Threading.AccessControl/src/System.Threading.AccessControl.csproj

index 9e17bd1..6d2b9e9 100644 (file)
@@ -10,7 +10,7 @@ Microsoft.Diagnostics.Tracing.EventSource</PackageDescription>
     <PackageId>$(MSBuildProjectName)</PackageId>
     <AssemblyName>Microsoft.Diagnostics.Tracing.EventSource</AssemblyName>
     <DefineConstants>$(DefineConstants);NO_EVENTCOMMANDEXECUTED_SUPPORT;ES_BUILD_STANDALONE;FEATURE_MANAGED_ETW;TARGET_WINDOWS</DefineConstants>
-    <TargetFrameworks>net461-windows</TargetFrameworks>
+    <TargetFrameworks>net461</TargetFrameworks>
     <Nullable>enable</Nullable>
     <IncludePlatformAttributes>true</IncludePlatformAttributes>
     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
index 46457b7..7ad4466 100644 (file)
@@ -2,7 +2,7 @@
   <PropertyGroup>
     <DefineConstants>$(DefineConstants);USE_MDT_EVENTSOURCE</DefineConstants>
     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
-    <TargetFrameworks>net461-windows</TargetFrameworks>
+    <TargetFrameworks>net461</TargetFrameworks>
   </PropertyGroup>
   <PropertyGroup>
     <SDTTestDir>..\..\System.Diagnostics.Tracing\tests</SDTTestDir>
index c9c66f5..9a06f8e 100644 (file)
@@ -1,7 +1,7 @@
 <Project Sdk="Microsoft.NET.Sdk">
 
   <PropertyGroup>
-    <TargetFrameworks>netstandard2.0;net461</TargetFrameworks>
+    <TargetFrameworks>netstandard2.0;net461-windows</TargetFrameworks>
     <EnableDefaultItems>true</EnableDefaultItems>
     <PackageDescription>XML configuration provider implementation for Microsoft.Extensions.Configuration.</PackageDescription>
   </PropertyGroup>
index 85e8e1d..35ceadc 100644 (file)
@@ -1,7 +1,7 @@
 <Project Sdk="Microsoft.NET.Sdk">
 
   <PropertyGroup>
-    <TargetFrameworks>$(NetCoreAppCurrent);net461</TargetFrameworks>
+    <TargetFrameworks>$(NetCoreAppCurrent);net461-windows</TargetFrameworks>
     <EnableDefaultItems>true</EnableDefaultItems>
   </PropertyGroup>
 
index a2a273e..22d8ee7 100644 (file)
@@ -5,14 +5,6 @@
   </PropertyGroup>
 
   <ItemGroup>
-    <ProjectReference Include="..\src\Microsoft.NETCore.Platforms.csproj" />
-    <!-- Workaround NuGet promoting this to a ProjectReference -->
-    <PackageReference Include="System.Memory" Condition="'$(TargetFramework)' == 'net472'" Version="$(SystemMemoryVersion)" />
-    <PackageReference Include="System.Security.AccessControl" Condition="'$(TargetFramework)' == 'net472'" Version="$(SystemSecurityAccessControlVersion)" />
-    <PackageReference Include="System.Security.Principal.Windows" Condition="'$(TargetFramework)' == 'net472'" Version="$(SystemSecurityPrincipalWindowsVersion)" />
-  </ItemGroup>
-  
-  <ItemGroup>
     <Compile Include="AssemblyInfo.cs" />
     <Compile Include="GenerateRuntimeGraphTests.cs" />
     <Compile Include="Log.cs" />
     <Content Include="..\src\runtimeGroups.props" CopyToOutputDirectory="PreserveNewest" />
     <Content Include="..\src\runtime.json" CopyToOutputDirectory="PreserveNewest" />
   </ItemGroup>
+
+  <ItemGroup>
+    <ProjectReference Include="..\src\Microsoft.NETCore.Platforms.csproj" />
+  </ItemGroup>
+
+  <!-- Workaround NuGet promoting this to a ProjectReference -->
+  <ItemGroup Condition="'$(TargetFramework)' == 'net472'">
+    <PackageReference Include="System.Memory" Version="$(SystemMemoryVersion)" />
+    <PackageReference Include="System.Security.Principal.Windows" Version="$(SystemSecurityPrincipalWindowsVersion)" />
+    <ProjectReference Include="$(LibrariesProjectRoot)System.Security.AccessControl\src\System.Security.AccessControl.csproj" />
+  </ItemGroup>
 </Project>
\ No newline at end of file
index 3900dc6..821cd03 100644 (file)
@@ -1,7 +1,7 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
     <IncludeRemoteExecutor>true</IncludeRemoteExecutor>
-    <TargetFrameworks>$(NetCoreAppCurrent);net461</TargetFrameworks>
+    <TargetFrameworks>$(NetCoreAppCurrent);net48-windows</TargetFrameworks>
   </PropertyGroup>
   <ItemGroup>
     <Compile Include="$(CommonPath)System\Runtime\CompilerServices\IsExternalInit.cs" Link="Common\System\Runtime\CompilerServices\IsExternalInit.cs" />
@@ -52,7 +52,7 @@
     <Compile Include="UtilsTests.cs" />
     <Compile Include="VBMathTests.cs" />
   </ItemGroup>
-  <ItemGroup Condition="'$(TargetFramework)' == 'net461'">
+  <ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'">
     <ProjectReference Include="$(LibrariesProjectRoot)System.Text.Encoding.CodePages\src\System.Text.Encoding.CodePages.csproj" />
     <Reference Include="Microsoft.VisualBasic" />
   </ItemGroup>
index a0b77d0..ab664df 100644 (file)
@@ -15,7 +15,7 @@
 
   <ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
     <PackageReference Include="Microsoft.Win32.Registry" Version="$(MicrosoftWin32RegistryVersion)" />
-    <PackageReference Include="System.Security.AccessControl" Version="$(SystemSecurityAccessControlVersion)" />
+    <ProjectReference Include="$(LibrariesProjectRoot)System.Security.AccessControl\ref\System.Security.AccessControl.csproj" />
     <!-- Manually reference the transitive dependency to make NuGet pick the package over the transitive project: https://github.com/NuGet/Home/issues/10368 -->
     <PackageReference Include="System.Memory" Version="$(SystemMemoryVersion)" PrivateAssets="all" />
     <PackageReference Include="System.Security.Principal.Windows" Version="$(SystemSecurityPrincipalWindowsVersion)" PrivateAssets="all" />
index 881805e..e4466db 100644 (file)
@@ -23,14 +23,18 @@ System.Security.AccessControl.RegistrySecurity</PackageDescription>
     <Compile Include="Microsoft\Win32\RegistryAclExtensions.cs" />
   </ItemGroup>
 
+  <ItemGroup>
+    <ProjectReference Include="$(LibrariesProjectRoot)System.Security.AccessControl\src\System.Security.AccessControl.csproj" />
+  </ItemGroup>
+
   <ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp'">
     <Reference Include="Microsoft.Win32.Registry" />
     <Reference Include="System.Runtime" />
-    <Reference Include="System.Security.AccessControl" />
   </ItemGroup>
 
   <ItemGroup Condition="'$(TargetFrameworkIdentifier)' != '.NETCoreApp'">
     <PackageReference Include="Microsoft.Win32.Registry" Version="$(MicrosoftWin32RegistryVersion)" />
-    <PackageReference Include="System.Security.AccessControl" Version="$(SystemSecurityAccessControlVersion)" />
+    <!-- Manually reference the transitive dependency to make NuGet pick the package over the transitive project: https://github.com/NuGet/Home/issues/10368 -->
+    <PackageReference Include="System.Security.Principal.Windows" Version="$(SystemSecurityPrincipalWindowsVersion)" PrivateAssets="all" />
   </ItemGroup>
 </Project>
\ No newline at end of file
index 4ccc4b8..83d774d 100644 (file)
@@ -1,6 +1,6 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <TargetFrameworks>$(NetCoreAppCurrent)-windows;net461-windows</TargetFrameworks>
+    <TargetFrameworks>$(NetCoreAppCurrent)-windows;net461</TargetFrameworks>
     <IncludeRemoteExecutor>true</IncludeRemoteExecutor>
   </PropertyGroup>
   <ItemGroup>
index ee16f0c..5087ca3 100644 (file)
@@ -29,6 +29,7 @@
     <ProjectReference Include="$(LibrariesProjectRoot)System.Management\src\System.Management.csproj" />
     <ProjectReference Include="$(LibrariesProjectRoot)System.Reflection.Context\src\System.Reflection.Context.csproj" />
     <ProjectReference Include="$(LibrariesProjectRoot)System.Runtime.Caching\src\System.Runtime.Caching.csproj" />
+    <ProjectReference Include="$(LibrariesProjectRoot)System.Security.AccessControl\src\System.Security.AccessControl.csproj" />
     <ProjectReference Include="$(LibrariesProjectRoot)System.Security.Cryptography.Pkcs\src\System.Security.Cryptography.Pkcs.csproj" />
     <ProjectReference Include="$(LibrariesProjectRoot)System.Security.Cryptography.ProtectedData\src\System.Security.Cryptography.ProtectedData.csproj" />
     <ProjectReference Include="$(LibrariesProjectRoot)System.Security.Cryptography.Xml\src\System.Security.Cryptography.Xml.csproj" />
@@ -63,7 +64,6 @@
     <PackageReference Include="System.Reflection.Emit" Version="$(SystemReflectionEmitVersion)" />
     <PackageReference Include="System.Reflection.Emit.ILGeneration" Version="$(SystemReflectionEmitILGenerationVersion)" />
     <PackageReference Include="System.Reflection.Emit.Lightweight" Version="$(SystemReflectionEmitLightweightVersion)" />
-    <PackageReference Include="System.Security.AccessControl" Version="$(SystemSecurityAccessControlVersion)" />
     <PackageReference Include="System.Security.Cryptography.Cng" Version="$(SystemSecurityCryptographyCngVersion)" />
     <PackageReference Include="System.Security.Principal.Windows" Version="$(SystemSecurityPrincipalWindowsVersion)" />
   </ItemGroup>
index 302b968..92cadbe 100644 (file)
@@ -1,6 +1,6 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <TargetFrameworks>$(NetCoreAppCurrent);netstandard2.0;net461</TargetFrameworks>
+    <TargetFrameworks>$(NetCoreAppCurrent);netstandard2.0;net461-windows</TargetFrameworks>
     <!-- opt-out of trimming until it works https://github.com/dotnet/runtime/issues/49062 -->
     <SetIsTrimmable>false</SetIsTrimmable>
     <NoWarn>$(NoWarn);CA1847</NoWarn>
index 9751595..4c5895f 100644 (file)
@@ -1,7 +1,7 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
     <IncludeRemoteExecutor>true</IncludeRemoteExecutor>
-    <TargetFrameworks>$(NetCoreAppCurrent);net461</TargetFrameworks>
+    <TargetFrameworks>$(NetCoreAppCurrent);net461-windows</TargetFrameworks>
     <IgnoreForCI Condition="'$(TargetOS)' == 'Browser'">true</IgnoreForCI>
   </PropertyGroup>
   <ItemGroup>
index 628b8d1..eff5503 100644 (file)
@@ -1,7 +1,7 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
-    <TargetFrameworks>$(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent)-FreeBSD;$(NetCoreAppCurrent)-illumos;$(NetCoreAppCurrent)-Solaris;$(NetCoreAppCurrent)-Linux;$(NetCoreAppCurrent)-OSX;$(NetCoreAppCurrent)-iOS;$(NetCoreAppCurrent)-tvOS;$(NetCoreAppCurrent);netcoreapp3.1-windows;netcoreapp3.1-FreeBSD;netcoreapp3.1-Linux;netcoreapp3.1-OSX;netcoreapp3.1;netstandard2.0;net461</TargetFrameworks>
+    <TargetFrameworks>$(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent)-FreeBSD;$(NetCoreAppCurrent)-illumos;$(NetCoreAppCurrent)-Solaris;$(NetCoreAppCurrent)-Linux;$(NetCoreAppCurrent)-OSX;$(NetCoreAppCurrent)-iOS;$(NetCoreAppCurrent)-tvOS;$(NetCoreAppCurrent);netcoreapp3.1-windows;netcoreapp3.1-FreeBSD;netcoreapp3.1-Linux;netcoreapp3.1-OSX;netcoreapp3.1;netstandard2.0;net461-windows</TargetFrameworks>
     <NoWarn>$(NoWarn);CA2249;CA1838</NoWarn>
     <Nullable>enable</Nullable>
     <IsPackable>true</IsPackable>
index 4cc65fb..370bfcc 100644 (file)
@@ -23,7 +23,6 @@
     <PackageReference Include="System.IO.FileSystem.AccessControl" Version="$(SystemIOFileSystemAccessControlVersion)" />
     <!-- Manually reference the transitive dependency to make NuGet pick the package over the transitive project: https://github.com/NuGet/Home/issues/10368 -->
     <PackageReference Include="System.Security.Principal.Windows" Version="$(SystemSecurityPrincipalWindowsVersion)" PrivateAssets="all" />
-    <PackageReference Include="System.Security.AccessControl" Version="$(SystemSecurityAccessControlVersion)" PrivateAssets="all" />
     <PackageReference Include="System.Memory" Version="$(SystemMemoryVersion)" PrivateAssets="all" />
     <PackageReference Include="System.Numerics.Vectors" Version="$(SystemNumericsVectorsVersion)" PrivateAssets="all" />
     <ProjectReference Include="$(LibrariesProjectRoot)System.Security.Permissions\ref\System.Security.Permissions.csproj" />
index a5e9b24..94d1b0e 100644 (file)
@@ -152,8 +152,6 @@ System.Data.OleDb.OleDbTransaction</PackageDescription>
     <PackageReference Include="Microsoft.Win32.Registry" Version="$(MicrosoftWin32RegistryVersion)" />
     <PackageReference Include="System.Security.Principal.Windows" Version="$(SystemSecurityPrincipalWindowsVersion)" />
     <PackageReference Include="System.Memory" Version="$(SystemMemoryVersion)" />
-    <!-- Manually reference the transitive dependency to make NuGet pick the package over the transitive project: https://github.com/NuGet/Home/issues/10368 -->
-    <PackageReference Include="System.Security.AccessControl" Version="$(SystemSecurityAccessControlVersion)" PrivateAssets="all" />
     <!-- S.R.C.Unsafe isn't a primary but transitive dependency and this P2P makes sure that the live version is used. -->
     <ProjectReference Include="$(LibrariesProjectRoot)System.Runtime.CompilerServices.Unsafe\src\System.Runtime.CompilerServices.Unsafe.ilproj" PrivateAssets="all" />
   </ItemGroup>
index b994abf..81b52cb 100644 (file)
   </ItemGroup>
   <ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp'">
     <PackageReference Include="System.IO.FileSystem.AccessControl" Version="$(SystemIOFileSystemAccessControlVersion)" Condition="!$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net6.0'))" />
-    <PackageReference Include="System.Security.AccessControl" Version="$(SystemSecurityAccessControlVersion)" Condition="!$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net6.0'))" />
     <ProjectReference Include="$(LibrariesProjectRoot)System.Configuration.ConfigurationManager\src\System.Configuration.ConfigurationManager.csproj" />
     <ProjectReference Include="$(LibrariesProjectRoot)System.DirectoryServices\src\System.DirectoryServices.csproj" />
     <ProjectReference Include="$(LibrariesProjectRoot)System.DirectoryServices.Protocols\src\System.DirectoryServices.Protocols.csproj" />
+    <ProjectReference Include="$(LibrariesProjectRoot)System.Security.AccessControl\src\System.Security.AccessControl.csproj" />
     <Reference Include="netstandard" Condition="$(TargetFramework.StartsWith('netcoreapp3.1'))" />
     <Reference Include="Microsoft.Win32.Primitives" />
     <Reference Include="System.Collections" />
     <Reference Include="System.Runtime" />
     <Reference Include="System.Runtime.Extensions" />
     <Reference Include="System.Runtime.InteropServices" />
-    <Reference Include="System.Security.AccessControl" Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net6.0'))" />
     <Reference Include="System.Security.Claims" />
     <Reference Include="System.Security.Cryptography.X509Certificates" />
     <Reference Include="System.Security.Principal" />
index a8259f7..0da0155 100644 (file)
@@ -9,6 +9,7 @@
     <Compile Include="System.DirectoryServices.manual.cs" />
   </ItemGroup>
   <ItemGroup>
+    <ProjectReference Include="$(LibrariesProjectRoot)System.Security.AccessControl\src\System.Security.AccessControl.csproj" />
     <ProjectReference Include="$(LibrariesProjectRoot)System.Security.Permissions\ref\System.Security.Permissions.csproj" />
   </ItemGroup>
   <ItemGroup Condition="'$(TargetFramework)' == '$(NetCoreAppCurrent)'">
@@ -16,7 +17,6 @@
   </ItemGroup>
   <ItemGroup Condition="!$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net6.0'))">
     <PackageReference Include="System.IO.FileSystem.AccessControl" Version="$(SystemIOFileSystemAccessControlVersion)" />
-    <PackageReference Include="System.Security.AccessControl" Version="$(SystemSecurityAccessControlVersion)" />
     <PackageReference Include="System.Security.Principal.Windows" Version="$(SystemSecurityPrincipalWindowsVersion)" />
   </ItemGroup>
   <ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.1'">
index 6cbf224..41798f7 100644 (file)
@@ -156,11 +156,11 @@ System.DirectoryServices.ActiveDirectory.DomainController</PackageDescription>
     <Compile Include="$(CommonPath)System\Obsoletions.cs" Link="System\Obsoletions.cs" />
   </ItemGroup>
   <ItemGroup>
+    <ProjectReference Include="$(LibrariesProjectRoot)System.Security.AccessControl\src\System.Security.AccessControl.csproj" />
     <ProjectReference Include="$(LibrariesProjectRoot)System.Security.Permissions\src\System.Security.Permissions.csproj" />
   </ItemGroup>
   <ItemGroup Condition="!$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net6.0'))">
     <PackageReference Include="System.IO.FileSystem.AccessControl" Version="$(SystemIOFileSystemAccessControlVersion)" />
-    <PackageReference Include="System.Security.AccessControl" Version="$(SystemSecurityAccessControlVersion)" />
     <PackageReference Include="System.Security.Principal.Windows" Version="$(SystemSecurityPrincipalWindowsVersion)" />
   </ItemGroup>
   <ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp'">
@@ -183,7 +183,6 @@ System.DirectoryServices.ActiveDirectory.DomainController</PackageDescription>
     <Reference Include="System.Runtime" />
     <Reference Include="System.Runtime.Extensions" />
     <Reference Include="System.Runtime.InteropServices" />
-    <Reference Include="System.Security.AccessControl" Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net6.0'))" />
     <Reference Include="System.Security.Claims" />
     <Reference Include="System.Security.Cryptography.Algorithms" />
     <Reference Include="System.Security.Principal.Windows" Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net6.0'))" />
diff --git a/src/libraries/System.Security.AccessControl/NuGet.config b/src/libraries/System.Security.AccessControl/NuGet.config
new file mode 100644 (file)
index 0000000..a66b7f9
--- /dev/null
@@ -0,0 +1,12 @@
+<configuration>
+  <!-- This disables restore in VS for projects that target platform specific target frameworks older than net5.0. -->
+  <packageRestore>
+    <!-- The 'automatic' key is set to True when the "Automatically check for missing packages during
+         build in Visual Studio" checkbox is set. Clearing the box sets this to False and disables
+         automatic restore. -->
+    <add key="automatic" value="False" />
+    <!-- The 'enabled' key is True when the "Allow NuGet to download missing packages" checkbox is set.
+         Clearing the box sets this to False, disabling command-line, automatic, and MSBuild-integrated restore. -->
+    <add key="enabled" value="False" />
+  </packageRestore>
+</configuration>
\ No newline at end of file
diff --git a/src/libraries/System.Security.AccessControl/ref/System.Security.AccessControl.Evidence.cs b/src/libraries/System.Security.AccessControl/ref/System.Security.AccessControl.Evidence.cs
deleted file mode 100644 (file)
index 9c42db1..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// ------------------------------------------------------------------------------
-// Changes to this file must follow the https://aka.ms/api-review process.
-// ------------------------------------------------------------------------------
-
-#nullable enable
-
-namespace System.Security.Policy
-{
-    public sealed partial class Evidence : System.Collections.ICollection, System.Collections.IEnumerable
-    {
-        public Evidence() { }
-        [System.ObsoleteAttribute("This constructor is obsolete. Use the constructor which accepts arrays of EvidenceBase instead.")]
-        public Evidence(object[] hostEvidence, object[] assemblyEvidence) { }
-        public Evidence(System.Security.Policy.Evidence evidence) { }
-        public Evidence(System.Security.Policy.EvidenceBase[] hostEvidence, System.Security.Policy.EvidenceBase[] assemblyEvidence) { }
-        [System.ObsoleteAttribute("Evidence should not be treated as an ICollection. Use GetHostEnumerator and GetAssemblyEnumerator to iterate over the evidence to collect a count.")]
-        public int Count { get { throw null; } }
-        public bool IsReadOnly { get { throw null; } }
-        public bool IsSynchronized { get { throw null; } }
-        public bool Locked { get { throw null; } set { } }
-        public object SyncRoot { get { throw null; } }
-        [System.ObsoleteAttribute("Evidence.AddAssembly has been deprecated. Use AddAssemblyEvidence instead.")]
-        public void AddAssembly(object id) { }
-        public void AddAssemblyEvidence<T>(T evidence) where T : System.Security.Policy.EvidenceBase { }
-        [System.ObsoleteAttribute("Evidence.AddHost has been deprecated. Use AddHostEvidence instead.")]
-        public void AddHost(object id) { }
-        public void AddHostEvidence<T>(T evidence) where T : System.Security.Policy.EvidenceBase { }
-        public void Clear() { }
-        public System.Security.Policy.Evidence? Clone() { throw null; }
-        [System.ObsoleteAttribute("Evidence should not be treated as an ICollection. Use the GetHostEnumerator and GetAssemblyEnumerator methods rather than using CopyTo.")]
-        public void CopyTo(System.Array array, int index) { }
-        public System.Collections.IEnumerator GetAssemblyEnumerator() { throw null; }
-        public T? GetAssemblyEvidence<T>() where T : System.Security.Policy.EvidenceBase { throw null; }
-        [System.ObsoleteAttribute("GetEnumerator is obsolete. Use GetAssemblyEnumerator and GetHostEnumerator instead.")]
-        public System.Collections.IEnumerator GetEnumerator() { throw null; }
-        public System.Collections.IEnumerator GetHostEnumerator() { throw null; }
-        public T? GetHostEvidence<T>() where T : System.Security.Policy.EvidenceBase { throw null; }
-        public void Merge(System.Security.Policy.Evidence evidence) { }
-        public void RemoveType(System.Type t) { }
-    }
-    public abstract partial class EvidenceBase
-    {
-        protected EvidenceBase() { }
-        public virtual System.Security.Policy.EvidenceBase? Clone() { throw null; }
-    }
-}
index b47ecfd..e7007ca 100644 (file)
@@ -530,3 +530,44 @@ namespace System.Security.AccessControl
         public void SetAudit(System.Security.Principal.SecurityIdentifier sid, System.Security.AccessControl.ObjectAuditRule rule) { }
     }
 }
+
+namespace System.Security.Policy
+{
+    public sealed partial class Evidence : System.Collections.ICollection, System.Collections.IEnumerable
+    {
+        public Evidence() { }
+        [System.ObsoleteAttribute("This constructor is obsolete. Please use the constructor which takes arrays of EvidenceBase instead.")]
+        public Evidence(object[] hostEvidence, object[] assemblyEvidence) { }
+        public Evidence(System.Security.Policy.Evidence evidence) { }
+        public Evidence(System.Security.Policy.EvidenceBase[] hostEvidence, System.Security.Policy.EvidenceBase[] assemblyEvidence) { }
+        [System.ObsoleteAttribute("Evidence should not be treated as an ICollection. Please use GetHostEnumerator and GetAssemblyEnumerator to iterate over the evidence to collect a count.")]
+        public int Count { get { throw null; } }
+        public bool IsReadOnly { get { throw null; } }
+        public bool IsSynchronized { get { throw null; } }
+        public bool Locked { get { throw null; } set { } }
+        public object SyncRoot { get { throw null; } }
+        [System.ObsoleteAttribute("This method is obsolete. Please use AddAssemblyEvidence instead.")]
+        public void AddAssembly(object id) { }
+        public void AddAssemblyEvidence<T>(T evidence) where T : System.Security.Policy.EvidenceBase { }
+        [System.ObsoleteAttribute("This method is obsolete. Please use AddHostEvidence instead.")]
+        public void AddHost(object id) { }
+        public void AddHostEvidence<T>(T evidence) where T : System.Security.Policy.EvidenceBase { }
+        public void Clear() { }
+        public System.Security.Policy.Evidence? Clone() { throw null; }
+        [System.ObsoleteAttribute("Evidence should not be treated as an ICollection. Please use the GetHostEnumerator and GetAssemblyEnumerator methods rather than using CopyTo.")]
+        public void CopyTo(System.Array array, int index) { }
+        public System.Collections.IEnumerator GetAssemblyEnumerator() { throw null; }
+        public T? GetAssemblyEvidence<T>() where T : System.Security.Policy.EvidenceBase { throw null; }
+        [System.ObsoleteAttribute("GetEnumerator is obsolete. Please use GetAssemblyEnumerator and GetHostEnumerator instead.")]
+        public System.Collections.IEnumerator GetEnumerator() { throw null; }
+        public System.Collections.IEnumerator GetHostEnumerator() { throw null; }
+        public T? GetHostEvidence<T>() where T : System.Security.Policy.EvidenceBase { throw null; }
+        public void Merge(System.Security.Policy.Evidence evidence) { }
+        public void RemoveType(System.Type t) { }
+    }
+    public abstract partial class EvidenceBase
+    {
+        protected EvidenceBase() { }
+        public virtual System.Security.Policy.EvidenceBase? Clone() { throw null; }
+    }
+}
index 348ff2f..d2f2a11 100644 (file)
@@ -1,13 +1,16 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+    <TargetFrameworks>$(NetCoreAppCurrent);netstandard2.0;net461</TargetFrameworks>
     <Nullable>enable</Nullable>
   </PropertyGroup>
   <ItemGroup>
-    <Compile Include="System.Security.AccessControl.cs" />
-    <Compile Include="System.Security.AccessControl.Evidence.cs" />
+    <Compile Condition="'$(TargetFramework)' != 'net461'" Include="System.Security.AccessControl.cs" />
+    <Compile Condition="'$(TargetFramework)' == 'net461'" Include="System.Security.AccessControl.net461.cs" />
   </ItemGroup>
-  <ItemGroup>
+  <ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETStandard'">
+    <PackageReference Include="System.Security.Principal.Windows" Version="$(SystemSecurityPrincipalWindowsVersion)" />
+  </ItemGroup>
+  <ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp'">
     <ProjectReference Include="$(LibrariesProjectRoot)System.Security.Principal.Windows\ref\System.Security.Principal.Windows.csproj" />
   </ItemGroup>
 </Project>
\ No newline at end of file
diff --git a/src/libraries/System.Security.AccessControl/ref/System.Security.AccessControl.net461.cs b/src/libraries/System.Security.AccessControl/ref/System.Security.AccessControl.net461.cs
new file mode 100644 (file)
index 0000000..9fa292c
--- /dev/null
@@ -0,0 +1,52 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// ------------------------------------------------------------------------------
+// Changes to this file must follow the https://aka.ms/api-review process.
+// ------------------------------------------------------------------------------
+
+using System.Runtime.CompilerServices;
+
+[assembly: TypeForwardedTo(typeof(System.Security.AccessControl.AccessControlActions))]
+[assembly: TypeForwardedTo(typeof(System.Security.AccessControl.AccessControlModification))]
+[assembly: TypeForwardedTo(typeof(System.Security.AccessControl.AccessControlSections))]
+[assembly: TypeForwardedTo(typeof(System.Security.AccessControl.AccessControlType))]
+[assembly: TypeForwardedTo(typeof(System.Security.AccessControl.AccessRule))]
+[assembly: TypeForwardedTo(typeof(System.Security.AccessControl.AccessRule<>))]
+[assembly: TypeForwardedTo(typeof(System.Security.AccessControl.AceEnumerator))]
+[assembly: TypeForwardedTo(typeof(System.Security.AccessControl.AceFlags))]
+[assembly: TypeForwardedTo(typeof(System.Security.AccessControl.AceQualifier))]
+[assembly: TypeForwardedTo(typeof(System.Security.AccessControl.AceType))]
+[assembly: TypeForwardedTo(typeof(System.Security.AccessControl.AuditFlags))]
+[assembly: TypeForwardedTo(typeof(System.Security.AccessControl.AuditRule))]
+[assembly: TypeForwardedTo(typeof(System.Security.AccessControl.AuditRule<>))]
+[assembly: TypeForwardedTo(typeof(System.Security.AccessControl.AuthorizationRule))]
+[assembly: TypeForwardedTo(typeof(System.Security.AccessControl.AuthorizationRuleCollection))]
+[assembly: TypeForwardedTo(typeof(System.Security.AccessControl.CommonAce))]
+[assembly: TypeForwardedTo(typeof(System.Security.AccessControl.CommonAcl))]
+[assembly: TypeForwardedTo(typeof(System.Security.AccessControl.CommonObjectSecurity))]
+[assembly: TypeForwardedTo(typeof(System.Security.AccessControl.CommonSecurityDescriptor))]
+[assembly: TypeForwardedTo(typeof(System.Security.AccessControl.CompoundAce))]
+[assembly: TypeForwardedTo(typeof(System.Security.AccessControl.CompoundAceType))]
+[assembly: TypeForwardedTo(typeof(System.Security.AccessControl.ControlFlags))]
+[assembly: TypeForwardedTo(typeof(System.Security.AccessControl.CustomAce))]
+[assembly: TypeForwardedTo(typeof(System.Security.AccessControl.DiscretionaryAcl))]
+[assembly: TypeForwardedTo(typeof(System.Security.AccessControl.GenericAce))]
+[assembly: TypeForwardedTo(typeof(System.Security.AccessControl.GenericAcl))]
+[assembly: TypeForwardedTo(typeof(System.Security.AccessControl.GenericSecurityDescriptor))]
+[assembly: TypeForwardedTo(typeof(System.Security.AccessControl.InheritanceFlags))]
+[assembly: TypeForwardedTo(typeof(System.Security.AccessControl.KnownAce))]
+[assembly: TypeForwardedTo(typeof(System.Security.AccessControl.NativeObjectSecurity))]
+[assembly: TypeForwardedTo(typeof(System.Security.AccessControl.ObjectAccessRule))]
+[assembly: TypeForwardedTo(typeof(System.Security.AccessControl.ObjectAce))]
+[assembly: TypeForwardedTo(typeof(System.Security.AccessControl.ObjectAceFlags))]
+[assembly: TypeForwardedTo(typeof(System.Security.AccessControl.ObjectAuditRule))]
+[assembly: TypeForwardedTo(typeof(System.Security.AccessControl.ObjectSecurity))]
+[assembly: TypeForwardedTo(typeof(System.Security.AccessControl.ObjectSecurity<>))]
+[assembly: TypeForwardedTo(typeof(System.Security.AccessControl.PrivilegeNotHeldException))]
+[assembly: TypeForwardedTo(typeof(System.Security.AccessControl.PropagationFlags))]
+[assembly: TypeForwardedTo(typeof(System.Security.AccessControl.QualifiedAce))]
+[assembly: TypeForwardedTo(typeof(System.Security.AccessControl.RawAcl))]
+[assembly: TypeForwardedTo(typeof(System.Security.AccessControl.RawSecurityDescriptor))]
+[assembly: TypeForwardedTo(typeof(System.Security.AccessControl.ResourceType))]
+[assembly: TypeForwardedTo(typeof(System.Security.AccessControl.SecurityInfos))]
+[assembly: TypeForwardedTo(typeof(System.Security.AccessControl.SystemAcl))]
diff --git a/src/libraries/System.Security.AccessControl/src/CompatibilitySuppressions.xml b/src/libraries/System.Security.AccessControl/src/CompatibilitySuppressions.xml
new file mode 100644 (file)
index 0000000..577d03d
--- /dev/null
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Suppressions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+  <Suppression>
+    <DiagnosticId>CP0001</DiagnosticId>
+    <Left>lib/netstandard2.0/System.Security.AccessControl.dll</Left>
+    <Right>lib/net461/System.Security.AccessControl.dll</Right>
+  </Suppression>
+  <Suppression>
+    <DiagnosticId>PKV006</DiagnosticId>
+    <Target>.NETFramework,Version=v4.6</Target>
+  </Suppression>
+  <Suppression>
+    <DiagnosticId>PKV006</DiagnosticId>
+    <Target>.NETStandard,Version=v1.3</Target>
+  </Suppression>
+  <Suppression>
+    <DiagnosticId>PKV007</DiagnosticId>
+    <Target>.NETFramework,Version=v4.6-win</Target>
+  </Suppression>
+  <Suppression>
+    <DiagnosticId>PKV007</DiagnosticId>
+    <Target>.NETStandard,Version=v1.3-win</Target>
+  </Suppression>
+</Suppressions>
\ No newline at end of file
diff --git a/src/libraries/System.Security.AccessControl/src/ILLink/ILLink.Descriptors.LibraryBuild.xml b/src/libraries/System.Security.AccessControl/src/ILLink/ILLink.Descriptors.LibraryBuild.xml
new file mode 100644 (file)
index 0000000..881d8ee
--- /dev/null
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<linker>
+    <assembly fullname="System.Security.AccessControl">
+        <!-- This file should be removed once issue https://github.com/mono/linker/issues/2238 is fixed. -->
+        <type fullname="System.Security.AccessControl.AceEnumerator" />
+    </assembly>
+</linker>
index ae2bd9f..ee7ab7e 100644 (file)
@@ -1,14 +1,24 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
-    <TargetFrameworks>$(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent)</TargetFrameworks>
+    <TargetFrameworks>$(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent);netstandard2.0-windows;netstandard2.0;net461-windows</TargetFrameworks>
+    <IsPackable>true</IsPackable>
+    <PackageDescription>Provides base classes that enable managing access and audit control lists on securable objects.
+
+Commonly Used Types:
+System.Security.AccessControl.AccessRule
+System.Security.AccessControl.AuditRule
+System.Security.AccessControl.ObjectAccessRule
+System.Security.AccessControl.ObjectAuditRule
+System.Security.AccessControl.ObjectSecurity</PackageDescription>
     <Nullable>enable</Nullable>
   </PropertyGroup>
   <!-- DesignTimeBuild requires all the TargetFramework Derived Properties to not be present in the first property group. -->
   <PropertyGroup>
+    <IsPartialFacadeAssembly Condition="$([MSBuild]::GetTargetFrameworkIdentifier('$(TargetFramework)')) == '.NETFramework'">true</IsPartialFacadeAssembly>
     <GeneratePlatformNotSupportedAssemblyMessage Condition="'$(TargetsWindows)' != 'true'">SR.PlatformNotSupported_AccessControl</GeneratePlatformNotSupportedAssemblyMessage>
   </PropertyGroup>
-  <ItemGroup Condition="'$(TargetsWindows)' == 'true'">
+  <ItemGroup Condition="'$(IsPartialFacadeAssembly)' != 'true' and '$(TargetsWindows)' == 'true'">
     <Compile Include="System\Security\AccessControl\ACE.cs" />
     <Compile Include="System\Security\AccessControl\ACL.cs" />
     <Compile Include="System\Security\AccessControl\CommonObjectSecurity.cs" />
@@ -78,8 +88,7 @@
     <Compile Include="$(CommonPath)Interop\Windows\Advapi32\Interop.DuplicateTokenEx_SafeTokenHandle.cs"
              Link="Common\Interop\Interop.DuplicateTokenEx_SafeTokenHandle.cs" />
   </ItemGroup>
-  <ItemGroup>
-    <ProjectReference Include="$(LibrariesProjectRoot)System.Security.Principal.Windows\src\System.Security.Principal.Windows.csproj" />
+  <ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp'">
     <Reference Include="System.Collections" />
     <Reference Include="System.Collections.NonGeneric" />
     <Reference Include="System.Diagnostics.Debug" />
     <Reference Include="System.Runtime" />
     <Reference Include="System.Runtime.Extensions" />
     <Reference Include="System.Runtime.InteropServices" />
+    <Reference Include="System.Security.Principal.Windows" />
     <Reference Include="System.Threading" />
     <Reference Include="System.Threading.Thread" />
     <Reference Include="Microsoft.Win32.Primitives" />
   </ItemGroup>
+  <ItemGroup Condition="'$(TargetFrameworkIdentifier)' != '.NETCoreApp'">
+    <PackageReference Include="System.Security.Principal.Windows" Version="$(SystemSecurityPrincipalWindowsVersion)" />
+  </ItemGroup>
 </Project>
index 2417c75..d01ec3d 100644 (file)
@@ -1,7 +1,7 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
-    <TargetFrameworks>$(NetCoreAppCurrent);netstandard2.0;net461</TargetFrameworks>
+    <TargetFrameworks>$(NetCoreAppCurrent);netstandard2.0;net461-windows</TargetFrameworks>
     <IsPackable>true</IsPackable>
     <PackageDescription>Provides classes to support the creation and validation of XML digital signatures. The classes in this namespace implement the World Wide Web Consortium Recommendation, "XML-Signature Syntax and Processing", described at http://www.w3.org/TR/xmldsig-core/.
 
@@ -143,7 +143,6 @@ System.Security.Cryptography.Xml.XmlLicenseTransform</PackageDescription>
     <Reference Include="System.Net.Requests" />
     <Reference Include="System.Runtime" />
     <Reference Include="System.Runtime.Numerics" />
-    <Reference Include="System.Security.AccessControl" />
     <Reference Include="System.Security.Cryptography.Algorithms" />
     <Reference Include="System.Security.Cryptography.Csp" />
     <Reference Include="System.Security.Cryptography.Encoding" />
index cd32ff9..c219bf3 100644 (file)
@@ -1,6 +1,6 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <TargetFrameworks>$(NetCoreAppCurrent);net461</TargetFrameworks>
+    <TargetFrameworks>$(NetCoreAppCurrent);net461-windows</TargetFrameworks>
   </PropertyGroup>
   <ItemGroup>
     <Compile Include="$(CommonTestPath)System\Security\Cryptography\PlatformSupport.cs"
index ef7cb3a..4d9a824 100644 (file)
 [assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Permissions.SecurityAttribute))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Permissions.SecurityPermissionAttribute))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Permissions.SecurityPermissionFlag))]
-#if NET6_0_OR_GREATER
 [assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Policy.Evidence))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Policy.EvidenceBase))]
-#endif
 #if NETCOREAPP
 [assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.IStackWalk))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.PermissionSet))]
index 8c77b32..23b70b9 100644 (file)
@@ -6,7 +6,6 @@
     <Compile Include="System.Security.Permissions.cs" Condition="'$(TargetFramework)' != 'net461'" />
     <Compile Include="System.Security.Permissions.Forwards.cs" Condition="'$(TargetFramework)' != 'net461'" />
     <Compile Include="System.Security.Permissions.netcoreapp.cs" Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp'" />
-    <Compile Include="$(LibrariesProjectRoot)System.Security.AccessControl\ref\System.Security.AccessControl.Evidence.cs" Condition="'$(TargetFramework)' != 'net461' and !$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net6.0'))" />
     <Compile Include="System.Security.Permissions.net461.cs" Condition="'$(TargetFramework)' == 'net461'" />
   </ItemGroup>
   <ItemGroup Condition="'$(TargetFramework)' == 'net461'">
     <Reference Include="System.Xaml" />
     <Reference Include="WindowsBase" />
   </ItemGroup>
-  <ItemGroup Condition="'$(TargetFramework)' != 'net461' and !$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net6.0'))">
-    <PackageReference Include="System.Security.AccessControl" Version="$(SystemSecurityAccessControlVersion)" />
-    <!-- Manually reference the transitive dependency to make NuGet pick the package over the transitive project: https://github.com/NuGet/Home/issues/10368 -->
-    <PackageReference Include="System.Security.Principal.Windows" Version="$(SystemSecurityPrincipalWindowsVersion)" PrivateAssets="all" />
+  <ItemGroup>
+    <ProjectReference Include="$(LibrariesProjectRoot)System.Security.AccessControl\ref\System.Security.AccessControl.csproj" />
   </ItemGroup>
   <ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp'">
     <ProjectReference Include="$(LibrariesProjectRoot)System.Windows.Extensions\ref\System.Windows.Extensions.csproj" />
   </ItemGroup>
   <ItemGroup Condition="'$(TargetFramework)' == '$(NetCoreAppCurrent)'">
     <ProjectReference Include="$(LibrariesProjectRoot)System.Data.Common\ref\System.Data.Common.csproj" />
-    <ProjectReference Include="$(LibrariesProjectRoot)System.Security.AccessControl\ref\System.Security.AccessControl.csproj" />
     <ProjectReference Include="$(LibrariesProjectRoot)System.Security.Cryptography.Csp\ref\System.Security.Cryptography.Csp.csproj" />
     <ProjectReference Include="$(LibrariesProjectRoot)System.Text.RegularExpressions\ref\System.Text.RegularExpressions.csproj" />
   </ItemGroup>
index 40fce05..7bd9f73 100644 (file)
     <Left>lib/netstandard2.0/System.Security.Permissions.dll</Left>
     <Right>lib/netcoreapp3.1/System.Security.Permissions.dll</Right>
   </Suppression>
+  <Suppression>
+    <DiagnosticId>CP0001</DiagnosticId>
+    <Target>T:System.Security.Policy.Evidence</Target>
+    <Left>ref/net5.0/System.Security.Permissions.dll</Left>
+    <Right>lib/net5.0/System.Security.Permissions.dll</Right>
+    <IsBaselineSuppression>true</IsBaselineSuppression>
+  </Suppression>
+  <Suppression>
+    <DiagnosticId>CP0001</DiagnosticId>
+    <Target>T:System.Security.Policy.EvidenceBase</Target>
+    <Left>ref/net5.0/System.Security.Permissions.dll</Left>
+    <Right>lib/net5.0/System.Security.Permissions.dll</Right>
+    <IsBaselineSuppression>true</IsBaselineSuppression>
+  </Suppression>
+  <Suppression>
+    <DiagnosticId>CP0001</DiagnosticId>
+    <Target>T:System.Security.Policy.Evidence</Target>
+    <Left>ref/netcoreapp3.0/System.Security.Permissions.dll</Left>
+    <Right>lib/netstandard2.0/System.Security.Permissions.dll</Right>
+    <IsBaselineSuppression>true</IsBaselineSuppression>
+  </Suppression>
+  <Suppression>
+    <DiagnosticId>CP0001</DiagnosticId>
+    <Target>T:System.Security.Policy.EvidenceBase</Target>
+    <Left>ref/netcoreapp3.0/System.Security.Permissions.dll</Left>
+    <Right>lib/netstandard2.0/System.Security.Permissions.dll</Right>
+    <IsBaselineSuppression>true</IsBaselineSuppression>
+  </Suppression>
+  <Suppression>
+    <DiagnosticId>CP0001</DiagnosticId>
+    <Target>T:System.Security.Policy.Evidence</Target>
+    <Left>ref/netstandard2.0/System.Security.Permissions.dll</Left>
+    <Right>lib/netstandard2.0/System.Security.Permissions.dll</Right>
+    <IsBaselineSuppression>true</IsBaselineSuppression>
+  </Suppression>
+  <Suppression>
+    <DiagnosticId>CP0001</DiagnosticId>
+    <Target>T:System.Security.Policy.EvidenceBase</Target>
+    <Left>ref/netstandard2.0/System.Security.Permissions.dll</Left>
+    <Right>lib/netstandard2.0/System.Security.Permissions.dll</Right>
+    <IsBaselineSuppression>true</IsBaselineSuppression>
+  </Suppression>
+  <Suppression>
+    <DiagnosticId>CP0001</DiagnosticId>
+    <Target>T:System.Security.Policy.Evidence</Target>
+    <Left>lib/net5.0/System.Security.Permissions.dll</Left>
+    <Right>lib/net5.0/System.Security.Permissions.dll</Right>
+    <IsBaselineSuppression>true</IsBaselineSuppression>
+  </Suppression>
+  <Suppression>
+    <DiagnosticId>CP0001</DiagnosticId>
+    <Target>T:System.Security.Policy.EvidenceBase</Target>
+    <Left>lib/net5.0/System.Security.Permissions.dll</Left>
+    <Right>lib/net5.0/System.Security.Permissions.dll</Right>
+    <IsBaselineSuppression>true</IsBaselineSuppression>
+  </Suppression>
+  <Suppression>
+    <DiagnosticId>CP0001</DiagnosticId>
+    <Target>T:System.Security.Policy.Evidence</Target>
+    <Left>lib/netcoreapp3.0/System.Security.Permissions.dll</Left>
+    <Right>lib/netstandard2.0/System.Security.Permissions.dll</Right>
+    <IsBaselineSuppression>true</IsBaselineSuppression>
+  </Suppression>
+  <Suppression>
+    <DiagnosticId>CP0001</DiagnosticId>
+    <Target>T:System.Security.Policy.EvidenceBase</Target>
+    <Left>lib/netcoreapp3.0/System.Security.Permissions.dll</Left>
+    <Right>lib/netstandard2.0/System.Security.Permissions.dll</Right>
+    <IsBaselineSuppression>true</IsBaselineSuppression>
+  </Suppression>
+  <Suppression>
+    <DiagnosticId>CP0001</DiagnosticId>
+    <Target>T:System.Security.Policy.Evidence</Target>
+    <Left>lib/netstandard2.0/System.Security.Permissions.dll</Left>
+    <Right>lib/netstandard2.0/System.Security.Permissions.dll</Right>
+    <IsBaselineSuppression>true</IsBaselineSuppression>
+  </Suppression>
+  <Suppression>
+    <DiagnosticId>CP0001</DiagnosticId>
+    <Target>T:System.Security.Policy.EvidenceBase</Target>
+    <Left>lib/netstandard2.0/System.Security.Permissions.dll</Left>
+    <Right>lib/netstandard2.0/System.Security.Permissions.dll</Right>
+    <IsBaselineSuppression>true</IsBaselineSuppression>
+  </Suppression>
 </Suppressions>
\ No newline at end of file
index 19be1ea..f1e8e0b 100644 (file)
@@ -1,11 +1,11 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
     <IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
-    <TargetFrameworks>$(NetCoreAppCurrent);net5.0;netcoreapp3.1;netstandard2.0;net461</TargetFrameworks>
+    <TargetFrameworks>$(NetCoreAppCurrent);net5.0;netcoreapp3.1;netstandard2.0;net461-windows</TargetFrameworks>
     <IsPackable>true</IsPackable>
     <PackageDescription>Provides types supporting Code Access Security (CAS).</PackageDescription>
   </PropertyGroup>
-  <ItemGroup Condition="'$(TargetFramework)' != 'net461'">
+  <ItemGroup Condition="'$(TargetFrameworkIdentifier)' != '.NETFramework'">
     <Compile Include="System\ApplicationIdentity.cs" />
     <Compile Include="System\Configuration\ConfigurationPermission.cs" />
     <Compile Include="System\Configuration\ConfigurationPermissionAttribute.cs" />
     <Compile Include="System\Security\Policy\ApplicationVersionMatch.cs" />
     <Compile Include="System\Security\Policy\CodeConnectAccess.cs" />
     <Compile Include="System\Security\Policy\CodeGroup.cs" />
-    <Compile Include="$(LibrariesProjectRoot)System.Security.AccessControl\src\System\Security\Policy\Evidence.cs" Condition="!$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net6.0'))" />
-    <Compile Include="$(LibrariesProjectRoot)System.Security.AccessControl\src\System\Security\Policy\EvidenceBase.cs" Condition="!$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net6.0'))" />
     <Compile Include="System\Security\Policy\FileCodeGroup.cs" />
     <Compile Include="System\Security\Policy\FirstMatchCodeGroup.cs" />
     <Compile Include="System\Security\Policy\GacInstalled.cs" />
     <Compile Include="$(LibrariesProjectRoot)System.Private.CoreLib\src\System\Security\Permissions\PermissionState.cs"
              Link="System\Security\Permissions\PermissionState.cs" />
   </ItemGroup>
-  <ItemGroup Condition="!$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net6.0'))">
-    <PackageReference Include="System.Security.AccessControl" Version="$(SystemSecurityAccessControlVersion)" />
+  <ItemGroup>
+    <ProjectReference Include="$(LibrariesProjectRoot)System.Security.AccessControl\src\System.Security.AccessControl.csproj" />
   </ItemGroup>
   <ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp'">
     <ProjectReference Include="$(LibrariesProjectRoot)System.Windows.Extensions\src\System.Windows.Extensions.csproj" />
     <Reference Include="System.Resources.ResourceManager" />
     <Reference Include="System.Runtime" />
     <Reference Include="System.Runtime.Extensions" />
-    <Reference Include="System.Security.AccessControl" Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net6.0'))" />
     <Reference Include="System.Security.Cryptography.Algorithms" />
     <Reference Include="System.Security.Cryptography.Csp" />
     <Reference Include="System.Security.Cryptography.Primitives" />
index 037fe58..368d452 100644 (file)
@@ -1,6 +1,6 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <TargetFrameworks>$(NetCoreAppCurrent);net461-windows</TargetFrameworks>
+    <TargetFrameworks>$(NetCoreAppCurrent);net461</TargetFrameworks>
   </PropertyGroup>
   <ItemGroup>
     <Compile Include="BasicScenarioTests.cs" />
index 8886ffe..a0300f8 100644 (file)
@@ -2,7 +2,7 @@
   <PropertyGroup>
     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
     <OutputType>Exe</OutputType>
-    <TargetFrameworks>$(NetCoreAppCurrent);net461</TargetFrameworks>
+    <TargetFrameworks>$(NetCoreAppCurrent);net461-windows</TargetFrameworks>
     <Nullable>annotations</Nullable>
   </PropertyGroup>
   <ItemGroup>
@@ -40,4 +40,7 @@
   <ItemGroup>
     <ProjectReference Include="..\..\src\System.ServiceProcess.ServiceController.csproj" />
   </ItemGroup>
+  <ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'">
+    <Reference Include="System.ServiceProcess" />
+  </ItemGroup>
 </Project>
\ No newline at end of file
index 3f57e01..f699d47 100644 (file)
@@ -14,7 +14,7 @@
     <ProjectReference Include="$(LibrariesProjectRoot)System.Threading\ref\System.Threading.csproj" />
   </ItemGroup>
   <ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
-    <PackageReference Include="System.Security.AccessControl" Version="$(SystemSecurityAccessControlVersion)" />
+    <ProjectReference Include="$(LibrariesProjectRoot)System.Security.AccessControl\ref\System.Security.AccessControl.csproj" />
     <PackageReference Include="System.Security.Principal.Windows" Version="$(SystemSecurityPrincipalWindowsVersion)" />
   </ItemGroup>
 </Project>
\ No newline at end of file
index f71a0d7..a2fbcb4 100644 (file)
@@ -62,15 +62,16 @@ System.Security.AccessControl.SemaphoreSecurity</PackageDescription>
     <Compile Include="System\Threading\SemaphoreAcl.net46.cs" />
     <Compile Include="System\Threading\ThreadingAclExtensions.net46.cs" />
   </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="$(LibrariesProjectRoot)System.Security.AccessControl\src\System.Security.AccessControl.csproj" />
+  </ItemGroup>
   <ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp'">
     <Reference Include="System.Runtime" />
     <Reference Include="System.Runtime.InteropServices" />
-    <Reference Include="System.Security.AccessControl" />
     <Reference Include="System.Security.Principal.Windows" />
     <Reference Include="System.Threading" />
   </ItemGroup>
   <ItemGroup Condition="'$(TargetFrameworkIdentifier)' != '.NETCoreApp'">
-    <PackageReference Include="System.Security.AccessControl" Version="$(SystemSecurityAccessControlVersion)" />
     <PackageReference Include="System.Security.Principal.Windows" Version="$(SystemSecurityPrincipalWindowsVersion)" />
   </ItemGroup>
   <ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETStandard'">