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
+ [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
public virtual void GetRestrictedPermissions(System.Configuration.Internal.IInternalConfigRecord configRecord, out System.Security.PermissionSet permissionSet, out bool isHostReady) { throw null; }
-#pragma warning restore SYSLIB0003
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; }
string GetConfigPathFromLocationSubPath(string configPath, string locationSubPath);
System.Type GetConfigType(string typeName, bool throwOnError);
string GetConfigTypeName(System.Type t);
-#pragma warning disable SYSLIB0003
+ [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
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);
<TargetFrameworks>$(NetCoreAppCurrent);$(NetCoreAppPrevious);$(NetCoreAppMinimum);netstandard2.0;$(NetFrameworkMinimum)</TargetFrameworks>
<Nullable>disable</Nullable>
<NoWarn>$(NoWarn);CS0618</NoWarn>
+ <IncludeInternalObsoleteAttribute>true</IncludeInternalObsoleteAttribute>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.Configuration.ConfigurationManager.netframework.cs" Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'" />
</ItemGroup>
- <ItemGroup>
- <ProjectReference Include="$(LibrariesProjectRoot)System.Security.Permissions\ref\System.Security.Permissions.csproj" />
+ <!-- This reference is for the System.Security.PermissionSet class, which is implemented in corelib, so the reference is only necessary for netstandard. -->
+ <ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
+ <ProjectReference Include="$(LibrariesProjectRoot)System.Security.Permissions\ref\System.Security.Permissions.csproj" PrivateAssets="all" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'">
<!-- opt-out of trimming until it works https://github.com/dotnet/runtime/issues/49062 -->
<IsTrimmable>false</IsTrimmable>
<EnableAOTAnalyzer>false</EnableAOTAnalyzer>
+ <IncludeInternalObsoleteAttribute>true</IncludeInternalObsoleteAttribute>
<IsPackable>true</IsPackable>
<PackageDescription>Provides types that support using XML configuration files (app.config). This package exists only to support migrating existing .NET Framework code that already uses System.Configuration. When writing new code, use another configuration system instead, such as Microsoft.Extensions.Configuration.</PackageDescription>
</PropertyGroup>
<Compile Include="System\Diagnostics\TraceUtils.cs" />
</ItemGroup>
- <!-- Since this package is compatible with .NETStandard, it must also ensure its .NETFramework and .NETCoreApp behavior is compatible with its .NETStandard behavior.-->
- <ItemGroup>
- <ProjectReference Include="$(LibrariesProjectRoot)System.Security.Permissions\src\System.Security.Permissions.csproj" />
+ <!-- This reference is for the System.Security.PermissionSet class, which is implemented in corelib, so the reference is only necessary for netstandard. -->
+ <ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
+ <ProjectReference Include="$(LibrariesProjectRoot)System.Security.Permissions\src\System.Security.Permissions.csproj" PrivateAssets="all" />
</ItemGroup>
<ItemGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net7.0'))">
public virtual IDisposable Impersonate() => new DummyDisposable();
-#pragma warning disable SYSLIB0003 // Obsolete: CAS
+ [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
public virtual void GetRestrictedPermissions(IInternalConfigRecord configRecord, out PermissionSet permissionSet, out bool isHostReady)
{
permissionSet = new PermissionSet(null);
isHostReady = true;
}
-#pragma warning restore SYSLIB0003 // Obsolete: CAS
}
}
IDisposable Impersonate();
-#pragma warning disable SYSLIB0003 // Obsolete: CAS
+ [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
void GetRestrictedPermissions(IInternalConfigRecord configRecord, out PermissionSet permissionSet, out bool isHostReady);
-#pragma warning restore SYSLIB0003 // Obsolete: CAS
}
}
public IDisposable Impersonate() => new DummyDisposable();
-#pragma warning disable SYSLIB0003
+ [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
public void GetRestrictedPermissions(IInternalConfigRecord configRecord, out PermissionSet permissionSet, out bool isHostReady)
{
permissionSet = new PermissionSet(null);
isHostReady = true;
}
-#pragma warning restore SYSLIB0003
}
}
--- /dev/null
+<Project>
+ <ItemGroup>
+ <!-- intentional dangling ref -->
+ <IgnoredReference Include="System.Security.Permissions" />
+ </ItemGroup>
+</Project>
--- /dev/null
+<Project>
+ <ItemGroup>
+ <!-- intentional dangling ref in System.Configuration.ConfigurationManager -->
+ <IgnoredReference Include="System.Security.Permissions" />
+ </ItemGroup>
+</Project>