Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1383,9 +1383,6 @@ public virtual void DeleteStream(string streamName) { }
public virtual string GetConfigPathFromLocationSubPath(string configPath, string locationSubPath) { throw null; }
public virtual System.Type GetConfigType(string typeName, bool throwOnError) { throw null; }
public virtual string GetConfigTypeName(System.Type t) { throw null; }
#pragma warning disable SYSLIB0003
public virtual void GetRestrictedPermissions(System.Configuration.Internal.IInternalConfigRecord configRecord, out System.Security.PermissionSet permissionSet, out bool isHostReady) { throw null; }
#pragma warning restore SYSLIB0003
Comment on lines -1386 to -1388
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This removes the API from both .NETCoreApp assemblies and the netstandard2.0 assembly. Is the .NETStandard change intentional?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we were exploring the intentional breaking change here. It was discussed as an option here: #64592 (comment)

public virtual string GetStreamName(string configPath) { throw null; }
public virtual string GetStreamNameForConfigSource(string streamName, string configSource) { throw null; }
public virtual object GetStreamVersion(string streamName) { throw null; }
Expand Down Expand Up @@ -1473,9 +1470,6 @@ public partial interface IInternalConfigHost
string GetConfigPathFromLocationSubPath(string configPath, string locationSubPath);
System.Type GetConfigType(string typeName, bool throwOnError);
string GetConfigTypeName(System.Type t);
#pragma warning disable SYSLIB0003
void GetRestrictedPermissions(System.Configuration.Internal.IInternalConfigRecord configRecord, out System.Security.PermissionSet permissionSet, out bool isHostReady);
#pragma warning restore SYSLIB0003
string GetStreamName(string configPath);
string GetStreamNameForConfigSource(string streamName, string configSource);
object GetStreamVersion(string streamName);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,8 @@
<Compile Include="System.Configuration.ConfigurationManager.netframework.cs" Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="$(LibrariesProjectRoot)System.Security.Permissions\ref\System.Security.Permissions.csproj" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'">
<ProjectReference Include="$(LibrariesProjectRoot)System.Security.Permissions\ref\System.Security.Permissions.csproj" />
<Reference Include="System.Configuration" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -1,5 +1,35 @@
<?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>
Comment thread
AraHaan marked this conversation as resolved.
<DiagnosticId>CP0006</DiagnosticId>
<Target>M:System.Configuration.Internal.IInternalConfigHost.GetRestrictedPermissions(System.Configuration.Internal.IInternalConfigRecord, out System.Security.PermissionSet, out bool)</Target>
<Left>lib/netstandard2.0/System.Configuration.ConfigurationManager.dll</Left>
<Right>lib/net462/System.Configuration.ConfigurationManager.dll</Right>
</Suppression>
<Suppression>
<DiagnosticId>CP0002</DiagnosticId>
<Target>M:System.Configuration.Internal.IInternalConfigHost.GetRestrictedPermissions(System.Configuration.Internal.IInternalConfigRecord, out System.Security.PermissionSet, out bool)</Target>
<Left>lib/netstandard2.0/System.Configuration.ConfigurationManager.dll</Left>
<Right>lib/net462/System.Configuration.ConfigurationManager.dll</Right>
</Suppression>
<Suppression>
<DiagnosticId>CP0002</DiagnosticId>
<Target>M:System.Configuration.Internal.IInternalConfigHost.GetRestrictedPermissions(System.Configuration.Internal.IInternalConfigRecord, out System.Security.PermissionSet, out bool)</Target>
<Left>lib/netstandard2.0/System.Configuration.ConfigurationManager.dll</Left>
<Right>lib/netstandard2.0/System.Configuration.ConfigurationManager.dll</Right>
</Suppression>
<Suppression>
<DiagnosticId>CP0002</DiagnosticId>
<Target>M:System.Configuration.Internal.IInternalConfigHost.GetRestrictedPermissions(System.Configuration.Internal.IInternalConfigRecord, out System.Security.PermissionSet, out bool)</Target>
<Left>lib/net6.0/System.Configuration.ConfigurationManager.dll</Left>
<Right>lib/net6.0/System.Configuration.ConfigurationManager.dll</Right>
</Suppression>
<Suppression>
<DiagnosticId>CP0002</DiagnosticId>
<Target>M:System.Configuration.Internal.IInternalConfigHost.GetRestrictedPermissions(System.Configuration.Internal.IInternalConfigRecord, out System.Security.PermissionSet, out bool)</Target>
<Left>lib/net7.0/System.Configuration.ConfigurationManager.dll</Left>
<Right>lib/net7.0/System.Configuration.ConfigurationManager.dll</Right>
</Suppression>
<Suppression>
<DiagnosticId>CP0002</DiagnosticId>
<Target>M:System.Configuration.Internal.DelegatingConfigHost.get_HasLocalConfig</Target>
Expand All @@ -24,6 +54,30 @@
<Left>lib/netstandard2.0/System.Configuration.ConfigurationManager.dll</Left>
<Right>lib/net462/System.Configuration.ConfigurationManager.dll</Right>
</Suppression>
<Suppression>
<DiagnosticId>CP0002</DiagnosticId>
<Target>M:System.Configuration.Internal.DelegatingConfigHost.GetRestrictedPermissions(System.Configuration.Internal.IInternalConfigRecord, out System.Security.PermissionSet, out bool)</Target>
<Left>lib/netstandard2.0/System.Configuration.ConfigurationManager.dll</Left>
<Right>lib/net462/System.Configuration.ConfigurationManager.dll</Right>
</Suppression>
<Suppression>
<DiagnosticId>CP0002</DiagnosticId>
<Target>M:System.Configuration.Internal.DelegatingConfigHost.GetRestrictedPermissions(System.Configuration.Internal.IInternalConfigRecord, out System.Security.PermissionSet, out bool)</Target>
<Left>lib/netstandard2.0/System.Configuration.ConfigurationManager.dll</Left>
<Right>lib/netstandard2.0/System.Configuration.ConfigurationManager.dll</Right>
</Suppression>
<Suppression>
<DiagnosticId>CP0002</DiagnosticId>
<Target>M:System.Configuration.Internal.DelegatingConfigHost.GetRestrictedPermissions(System.Configuration.Internal.IInternalConfigRecord, out System.Security.PermissionSet, out bool)</Target>
<Left>lib/net6.0/System.Configuration.ConfigurationManager.dll</Left>
<Right>lib/net6.0/System.Configuration.ConfigurationManager.dll</Right>
</Suppression>
<Suppression>
<DiagnosticId>CP0002</DiagnosticId>
<Target>M:System.Configuration.Internal.DelegatingConfigHost.GetRestrictedPermissions(System.Configuration.Internal.IInternalConfigRecord, out System.Security.PermissionSet, out bool)</Target>
<Left>lib/net7.0/System.Configuration.ConfigurationManager.dll</Left>
<Right>lib/net7.0/System.Configuration.ConfigurationManager.dll</Right>
</Suppression>
<Suppression>
<DiagnosticId>CP0002</DiagnosticId>
<Target>M:System.Configuration.SettingsAttributeDictionary.#ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)</Target>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@
</ItemGroup>

<!-- Since this package is compatible with .NETStandard, it must also ensure its .NETFramework and .NETCoreApp behavior is compatible with its .NETStandard behavior.-->
<ItemGroup>
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'">
<ProjectReference Include="$(LibrariesProjectRoot)System.Security.Permissions\src\System.Security.Permissions.csproj" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -231,12 +231,5 @@ public virtual void RefreshConfigPaths()

public virtual IDisposable Impersonate() => new DummyDisposable();

#pragma warning disable SYSLIB0003 // Obsolete: CAS
public virtual void GetRestrictedPermissions(IInternalConfigRecord configRecord, out PermissionSet permissionSet, out bool isHostReady)
{
permissionSet = new PermissionSet(null);
isHostReady = true;
}
#pragma warning restore SYSLIB0003 // Obsolete: CAS
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,5 @@ string EncryptSection(string clearTextXml, ProtectedConfigurationProvider protec

IDisposable Impersonate();

#pragma warning disable SYSLIB0003 // Obsolete: CAS
void GetRestrictedPermissions(IInternalConfigRecord configRecord, out PermissionSet permissionSet, out bool isHostReady);
#pragma warning restore SYSLIB0003 // Obsolete: CAS
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -304,12 +304,5 @@ internal static bool StaticIsFile(string streamName)

public IDisposable Impersonate() => new DummyDisposable();

#pragma warning disable SYSLIB0003
public void GetRestrictedPermissions(IInternalConfigRecord configRecord, out PermissionSet permissionSet, out bool isHostReady)
{
permissionSet = new PermissionSet(null);
isHostReady = true;
}
#pragma warning restore SYSLIB0003
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -314,12 +314,12 @@ bool IInternalConfigHost.IsTrustedConfigPath(string configPath)
throw new NotImplementedException();
}

#pragma warning disable SYSLIB0003 // Obsolete: CAS
#if NETFRAMEWORK // Obsolete: CAS (.NET Framework only)
void IInternalConfigHost.GetRestrictedPermissions(IInternalConfigRecord configRecord, out PermissionSet permissionSet, out bool isHostReady)
{
throw new NotImplementedException();
}
#pragma warning restore SYSLIB0003 // Obsolete: CAS
#endif
}
}
}