diff --git a/src/libraries/System.DirectoryServices/ref/System.DirectoryServices.cs b/src/libraries/System.DirectoryServices/ref/System.DirectoryServices.cs
index 9d1eb9f1c5fae..541ac7374ee85 100644
--- a/src/libraries/System.DirectoryServices/ref/System.DirectoryServices.cs
+++ b/src/libraries/System.DirectoryServices/ref/System.DirectoryServices.cs
@@ -262,54 +262,6 @@ public DirectoryServicesCOMException(string? message, System.Exception? inner) {
public string? ExtendedErrorMessage { get { throw null; } }
public override void GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { }
}
- [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
- public sealed partial class DirectoryServicesPermission : System.Security.Permissions.ResourcePermissionBase
- {
- public DirectoryServicesPermission() { }
- public DirectoryServicesPermission(System.DirectoryServices.DirectoryServicesPermissionAccess permissionAccess, string? path) { }
- public DirectoryServicesPermission(System.DirectoryServices.DirectoryServicesPermissionEntry[]? permissionAccessEntries) { }
- public DirectoryServicesPermission(System.Security.Permissions.PermissionState state) { }
- public System.DirectoryServices.DirectoryServicesPermissionEntryCollection? PermissionEntries { get { throw null; } }
- }
- [System.FlagsAttribute]
- public enum DirectoryServicesPermissionAccess
- {
- None = 0,
- Browse = 2,
- Write = 6,
- }
- [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
- [System.AttributeUsageAttribute(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Event | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)]
- public partial class DirectoryServicesPermissionAttribute : System.Security.Permissions.CodeAccessSecurityAttribute
- {
- public DirectoryServicesPermissionAttribute(System.Security.Permissions.SecurityAction action) : base(default(System.Security.Permissions.SecurityAction)) { }
- public string? Path { get { throw null; } set { } }
- public System.DirectoryServices.DirectoryServicesPermissionAccess PermissionAccess { get { throw null; } set { } }
- public override System.Security.IPermission? CreatePermission() { throw null; }
- }
- public partial class DirectoryServicesPermissionEntry
- {
- public DirectoryServicesPermissionEntry(System.DirectoryServices.DirectoryServicesPermissionAccess permissionAccess, string? path) { }
- public string? Path { get { throw null; } }
- public System.DirectoryServices.DirectoryServicesPermissionAccess PermissionAccess { get { throw null; } }
- }
- public partial class DirectoryServicesPermissionEntryCollection : System.Collections.CollectionBase
- {
- internal DirectoryServicesPermissionEntryCollection() { }
- public System.DirectoryServices.DirectoryServicesPermissionEntry? this[int index] { get { throw null; } set { } }
- public int Add(System.DirectoryServices.DirectoryServicesPermissionEntry value) { throw null; }
- public void AddRange(System.DirectoryServices.DirectoryServicesPermissionEntryCollection value) { }
- public void AddRange(System.DirectoryServices.DirectoryServicesPermissionEntry[] value) { }
- public bool Contains(System.DirectoryServices.DirectoryServicesPermissionEntry value) { throw null; }
- public void CopyTo(System.DirectoryServices.DirectoryServicesPermissionEntry[] array, int index) { }
- public int IndexOf(System.DirectoryServices.DirectoryServicesPermissionEntry value) { throw null; }
- public void Insert(int index, System.DirectoryServices.DirectoryServicesPermissionEntry value) { }
- protected override void OnClear() { }
- protected override void OnInsert(int index, object? value) { }
- protected override void OnRemove(int index, object? value) { }
- protected override void OnSet(int index, object? oldValue, object? newValue) { }
- public void Remove(System.DirectoryServices.DirectoryServicesPermissionEntry? value) { }
- }
public partial class DirectorySynchronization
{
public DirectorySynchronization() { }
diff --git a/src/libraries/System.DirectoryServices/ref/System.DirectoryServices.csproj b/src/libraries/System.DirectoryServices/ref/System.DirectoryServices.csproj
index d21c220ea80ae..311d92d229d9b 100644
--- a/src/libraries/System.DirectoryServices/ref/System.DirectoryServices.csproj
+++ b/src/libraries/System.DirectoryServices/ref/System.DirectoryServices.csproj
@@ -10,7 +10,9 @@
-
+
+
diff --git a/src/libraries/System.DirectoryServices/ref/System.DirectoryServices.manual.cs b/src/libraries/System.DirectoryServices/ref/System.DirectoryServices.manual.cs
index 72d6bd9586465..82771238fa832 100644
--- a/src/libraries/System.DirectoryServices/ref/System.DirectoryServices.manual.cs
+++ b/src/libraries/System.DirectoryServices/ref/System.DirectoryServices.manual.cs
@@ -5,6 +5,13 @@
// ------------------------------------------------------------------------------
using System.DirectoryServices.Design;
+using System.Runtime.CompilerServices;
+
+[assembly: TypeForwardedTo(typeof(System.DirectoryServices.DirectoryServicesPermission))]
+[assembly: TypeForwardedTo(typeof(System.DirectoryServices.DirectoryServicesPermissionAccess))]
+[assembly: TypeForwardedTo(typeof(System.DirectoryServices.DirectoryServicesPermissionAttribute))]
+[assembly: TypeForwardedTo(typeof(System.DirectoryServices.DirectoryServicesPermissionEntry))]
+[assembly: TypeForwardedTo(typeof(System.DirectoryServices.DirectoryServicesPermissionEntryCollection))]
namespace System.DirectoryServices
{
@@ -15,4 +22,4 @@ public partial class DirectoryEntry { }
namespace System.DirectoryServices.Design
{
internal sealed class DirectoryEntryConverter { }
-}
\ No newline at end of file
+}
diff --git a/src/libraries/System.DirectoryServices/src/CompatibilitySuppressions.xml b/src/libraries/System.DirectoryServices/src/CompatibilitySuppressions.xml
new file mode 100644
index 0000000000000..d1d3de69d38de
--- /dev/null
+++ b/src/libraries/System.DirectoryServices/src/CompatibilitySuppressions.xml
@@ -0,0 +1,29 @@
+
+
+
+
+ CP0001
+ T:System.DirectoryServices.DirectoryServicesPermission
+ true
+
+
+ CP0001
+ T:System.DirectoryServices.DirectoryServicesPermissionAccess
+ true
+
+
+ CP0001
+ T:System.DirectoryServices.DirectoryServicesPermissionAttribute
+ true
+
+
+ CP0001
+ T:System.DirectoryServices.DirectoryServicesPermissionEntry
+ true
+
+
+ CP0001
+ T:System.DirectoryServices.DirectoryServicesPermissionEntryCollection
+ true
+
+
diff --git a/src/libraries/System.DirectoryServices/src/System.DirectoryServices.Forwards.cs b/src/libraries/System.DirectoryServices/src/System.DirectoryServices.Forwards.cs
new file mode 100644
index 0000000000000..da53c1c305f1e
--- /dev/null
+++ b/src/libraries/System.DirectoryServices/src/System.DirectoryServices.Forwards.cs
@@ -0,0 +1,10 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+using System.Runtime.CompilerServices;
+
+[assembly: TypeForwardedTo(typeof(System.DirectoryServices.DirectoryServicesPermission))]
+[assembly: TypeForwardedTo(typeof(System.DirectoryServices.DirectoryServicesPermissionAccess))]
+[assembly: TypeForwardedTo(typeof(System.DirectoryServices.DirectoryServicesPermissionAttribute))]
+[assembly: TypeForwardedTo(typeof(System.DirectoryServices.DirectoryServicesPermissionEntry))]
+[assembly: TypeForwardedTo(typeof(System.DirectoryServices.DirectoryServicesPermissionEntryCollection))]
diff --git a/src/libraries/System.DirectoryServices/src/System.DirectoryServices.csproj b/src/libraries/System.DirectoryServices/src/System.DirectoryServices.csproj
index ef5e8c27e761a..50b541650e2f4 100644
--- a/src/libraries/System.DirectoryServices/src/System.DirectoryServices.csproj
+++ b/src/libraries/System.DirectoryServices/src/System.DirectoryServices.csproj
@@ -28,6 +28,7 @@ System.DirectoryServices.ActiveDirectory.DomainController
+
@@ -136,11 +137,6 @@ System.DirectoryServices.ActiveDirectory.DomainController
-
-
-
-
-
@@ -241,7 +237,9 @@ System.DirectoryServices.ActiveDirectory.DomainController
-
+
+
diff --git a/src/libraries/System.DirectoryServices/tests/System.DirectoryServices.Tests.csproj b/src/libraries/System.DirectoryServices/tests/System.DirectoryServices.Tests.csproj
index 37e3b348cb575..a261176a89954 100644
--- a/src/libraries/System.DirectoryServices/tests/System.DirectoryServices.Tests.csproj
+++ b/src/libraries/System.DirectoryServices/tests/System.DirectoryServices.Tests.csproj
@@ -1,4 +1,4 @@
-
+
$(NoWarn);SYSLIB0003
@@ -32,6 +32,7 @@
+
diff --git a/src/libraries/System.Runtime.Serialization.Formatters/tests/System.Runtime.Serialization.Formatters.Tests.csproj b/src/libraries/System.Runtime.Serialization.Formatters/tests/System.Runtime.Serialization.Formatters.Tests.csproj
index 6172f784d9dd7..d804eb9125d54 100644
--- a/src/libraries/System.Runtime.Serialization.Formatters/tests/System.Runtime.Serialization.Formatters.Tests.csproj
+++ b/src/libraries/System.Runtime.Serialization.Formatters/tests/System.Runtime.Serialization.Formatters.Tests.csproj
@@ -47,6 +47,7 @@
+
diff --git a/src/libraries/System.Security.Permissions/ref/System.Security.Permissions.cs b/src/libraries/System.Security.Permissions/ref/System.Security.Permissions.cs
index 143f18ff37707..9f6048c4b3e09 100644
--- a/src/libraries/System.Security.Permissions/ref/System.Security.Permissions.cs
+++ b/src/libraries/System.Security.Permissions/ref/System.Security.Permissions.cs
@@ -307,6 +307,57 @@ protected override void OnSet(int index, object oldValue, object newValue) { }
public void Remove(System.Diagnostics.PerformanceCounterPermissionEntry value) { }
}
}
+namespace System.DirectoryServices
+{
+ [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
+ public sealed partial class DirectoryServicesPermission : System.Security.Permissions.ResourcePermissionBase
+ {
+ public DirectoryServicesPermission() { }
+ public DirectoryServicesPermission(System.DirectoryServices.DirectoryServicesPermissionAccess permissionAccess, string path) { }
+ public DirectoryServicesPermission(System.DirectoryServices.DirectoryServicesPermissionEntry[] permissionAccessEntries) { }
+ public DirectoryServicesPermission(System.Security.Permissions.PermissionState state) { }
+ public System.DirectoryServices.DirectoryServicesPermissionEntryCollection PermissionEntries { get { throw null; } }
+ }
+ [System.FlagsAttribute]
+ public enum DirectoryServicesPermissionAccess
+ {
+ None = 0,
+ Browse = 2,
+ Write = 6,
+ }
+ [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
+ [System.AttributeUsageAttribute(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Event | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)]
+ public partial class DirectoryServicesPermissionAttribute : System.Security.Permissions.CodeAccessSecurityAttribute
+ {
+ public DirectoryServicesPermissionAttribute(System.Security.Permissions.SecurityAction action) : base(default(System.Security.Permissions.SecurityAction)) { }
+ public string Path { get { throw null; } set { } }
+ public System.DirectoryServices.DirectoryServicesPermissionAccess PermissionAccess { get { throw null; } set { } }
+ public override System.Security.IPermission CreatePermission() { throw null; }
+ }
+ public partial class DirectoryServicesPermissionEntry
+ {
+ public DirectoryServicesPermissionEntry(System.DirectoryServices.DirectoryServicesPermissionAccess permissionAccess, string path) { }
+ public string Path { get { throw null; } }
+ public System.DirectoryServices.DirectoryServicesPermissionAccess PermissionAccess { get { throw null; } }
+ }
+ public partial class DirectoryServicesPermissionEntryCollection : System.Collections.CollectionBase
+ {
+ internal DirectoryServicesPermissionEntryCollection() { }
+ public System.DirectoryServices.DirectoryServicesPermissionEntry this[int index] { get { throw null; } set { } }
+ public int Add(System.DirectoryServices.DirectoryServicesPermissionEntry value) { throw null; }
+ public void AddRange(System.DirectoryServices.DirectoryServicesPermissionEntryCollection value) { }
+ public void AddRange(System.DirectoryServices.DirectoryServicesPermissionEntry[] value) { }
+ public bool Contains(System.DirectoryServices.DirectoryServicesPermissionEntry value) { throw null; }
+ public void CopyTo(System.DirectoryServices.DirectoryServicesPermissionEntry[] array, int index) { }
+ public int IndexOf(System.DirectoryServices.DirectoryServicesPermissionEntry value) { throw null; }
+ public void Insert(int index, System.DirectoryServices.DirectoryServicesPermissionEntry value) { }
+ protected override void OnClear() { }
+ protected override void OnInsert(int index, object value) { }
+ protected override void OnRemove(int index, object value) { }
+ protected override void OnSet(int index, object oldValue, object newValue) { }
+ public void Remove(System.DirectoryServices.DirectoryServicesPermissionEntry value) { }
+ }
+}
namespace System.Drawing.Printing
{
#if NETCOREAPP
diff --git a/src/libraries/System.Security.Permissions/ref/System.Security.Permissions.csproj b/src/libraries/System.Security.Permissions/ref/System.Security.Permissions.csproj
index 8d45a9a47f5a9..27fb4a89ff948 100644
--- a/src/libraries/System.Security.Permissions/ref/System.Security.Permissions.csproj
+++ b/src/libraries/System.Security.Permissions/ref/System.Security.Permissions.csproj
@@ -1,7 +1,8 @@
-
+
$(NetCoreAppCurrent);$(NetCoreAppPrevious);$(NetCoreAppMinimum);netstandard2.0;$(NetFrameworkMinimum)
disable
+ true
@@ -25,6 +26,7 @@
+
diff --git a/src/libraries/System.Security.Permissions/ref/System.Security.Permissions.netframework.cs b/src/libraries/System.Security.Permissions/ref/System.Security.Permissions.netframework.cs
index f97228600911b..726d38676c29d 100644
--- a/src/libraries/System.Security.Permissions/ref/System.Security.Permissions.netframework.cs
+++ b/src/libraries/System.Security.Permissions/ref/System.Security.Permissions.netframework.cs
@@ -6,6 +6,11 @@
using System.Runtime.CompilerServices;
+[assembly: TypeForwardedTo(typeof(System.DirectoryServices.DirectoryServicesPermission))]
+[assembly: TypeForwardedTo(typeof(System.DirectoryServices.DirectoryServicesPermissionAccess))]
+[assembly: TypeForwardedTo(typeof(System.DirectoryServices.DirectoryServicesPermissionAttribute))]
+[assembly: TypeForwardedTo(typeof(System.DirectoryServices.DirectoryServicesPermissionEntry))]
+[assembly: TypeForwardedTo(typeof(System.DirectoryServices.DirectoryServicesPermissionEntryCollection))]
[assembly: TypeForwardedTo(typeof(System.Security.IPermission))]
[assembly: TypeForwardedTo(typeof(System.Security.ISecurityEncodable))]
[assembly: TypeForwardedTo(typeof(System.Security.Permissions.CodeAccessSecurityAttribute))]
diff --git a/src/libraries/System.Security.Permissions/src/System.Security.Permissions.csproj b/src/libraries/System.Security.Permissions/src/System.Security.Permissions.csproj
index 4ca77d0c7a954..c288d44efe151 100644
--- a/src/libraries/System.Security.Permissions/src/System.Security.Permissions.csproj
+++ b/src/libraries/System.Security.Permissions/src/System.Security.Permissions.csproj
@@ -6,6 +6,7 @@
$(NoWarn);nullable
true
Provides types supporting Code Access Security (CAS).
+ true
@@ -32,6 +33,11 @@
+
+
+
+
+
@@ -206,6 +212,7 @@
+
diff --git a/src/libraries/System.DirectoryServices/src/System/DirectoryServices/DirectoryServicesPermission.cs b/src/libraries/System.Security.Permissions/src/System/DirectoryServices/DirectoryServicesPermission.cs
similarity index 100%
rename from src/libraries/System.DirectoryServices/src/System/DirectoryServices/DirectoryServicesPermission.cs
rename to src/libraries/System.Security.Permissions/src/System/DirectoryServices/DirectoryServicesPermission.cs
diff --git a/src/libraries/System.DirectoryServices/src/System/DirectoryServices/DirectoryServicesPermissionAccess.cs b/src/libraries/System.Security.Permissions/src/System/DirectoryServices/DirectoryServicesPermissionAccess.cs
similarity index 100%
rename from src/libraries/System.DirectoryServices/src/System/DirectoryServices/DirectoryServicesPermissionAccess.cs
rename to src/libraries/System.Security.Permissions/src/System/DirectoryServices/DirectoryServicesPermissionAccess.cs
diff --git a/src/libraries/System.DirectoryServices/src/System/DirectoryServices/DirectoryServicesPermissionAttribute.cs b/src/libraries/System.Security.Permissions/src/System/DirectoryServices/DirectoryServicesPermissionAttribute.cs
similarity index 100%
rename from src/libraries/System.DirectoryServices/src/System/DirectoryServices/DirectoryServicesPermissionAttribute.cs
rename to src/libraries/System.Security.Permissions/src/System/DirectoryServices/DirectoryServicesPermissionAttribute.cs
diff --git a/src/libraries/System.DirectoryServices/src/System/DirectoryServices/DirectoryServicesPermissionEntry.cs b/src/libraries/System.Security.Permissions/src/System/DirectoryServices/DirectoryServicesPermissionEntry.cs
similarity index 100%
rename from src/libraries/System.DirectoryServices/src/System/DirectoryServices/DirectoryServicesPermissionEntry.cs
rename to src/libraries/System.Security.Permissions/src/System/DirectoryServices/DirectoryServicesPermissionEntry.cs
diff --git a/src/libraries/System.DirectoryServices/src/System/DirectoryServices/DirectoryServicesPermissionEntryCollection.cs b/src/libraries/System.Security.Permissions/src/System/DirectoryServices/DirectoryServicesPermissionEntryCollection.cs
similarity index 100%
rename from src/libraries/System.DirectoryServices/src/System/DirectoryServices/DirectoryServicesPermissionEntryCollection.cs
rename to src/libraries/System.Security.Permissions/src/System/DirectoryServices/DirectoryServicesPermissionEntryCollection.cs
diff --git a/src/libraries/System.Security.Permissions/tests/System.Security.Permissions.Tests.csproj b/src/libraries/System.Security.Permissions/tests/System.Security.Permissions.Tests.csproj
index 73f50b209fb16..6dd186e6d2d16 100644
--- a/src/libraries/System.Security.Permissions/tests/System.Security.Permissions.Tests.csproj
+++ b/src/libraries/System.Security.Permissions/tests/System.Security.Permissions.Tests.csproj
@@ -27,6 +27,7 @@
+
\ No newline at end of file
diff --git a/src/libraries/testPackages/packageSettings/System.DirectoryServices.AccountManagement/settings.targets b/src/libraries/testPackages/packageSettings/System.DirectoryServices.AccountManagement/settings.targets
new file mode 100644
index 0000000000000..a12e064a88069
--- /dev/null
+++ b/src/libraries/testPackages/packageSettings/System.DirectoryServices.AccountManagement/settings.targets
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/src/libraries/testPackages/packageSettings/System.DirectoryServices/settings.targets b/src/libraries/testPackages/packageSettings/System.DirectoryServices/settings.targets
new file mode 100644
index 0000000000000..2b22505987641
--- /dev/null
+++ b/src/libraries/testPackages/packageSettings/System.DirectoryServices/settings.targets
@@ -0,0 +1,6 @@
+
+
+
+
+
+