mirror of
https://github.com/BepInEx/dotnet-runtime.git
synced 2026-11-23 03:39:35 -10:00
Expose missing references which are present in the runtime and in packages in the targeting pack (#54147)
* Expose missing refs from runtime in targeting pack The platform analyzers warns for usages of APIs which aren't available on specific platforms. Exposing the missing reference assemblies which are already part of the runtime pack in the targeting pack. The big benefit of doing so is that customers don't need to reference the corresponding packages to target these APIs and that these five packages can be dead-ended. For more in-depth reasoning, see the detailed summary: https://github.com/dotnet/runtime/issues/53892#issuecomment-858542280 Fixes https://github.com/dotnet/runtime/issues/53892 * Update dependents of dead-ended packages Update depents by referencing the latest available package. Making sure that packages are never used on NetCoreAppCurrent by applying .NETCoreApp version conditions. * Fixes * Remove pkg validation suppression file * Update Windows Compatibility pack * Fix DirectoryServices pkg references * Fix netfx Pkcs restore/build * Fix version conflict * Packageindex and nits * nits
This commit is contained in:
1 parent
b90631f648
commit
663c40dbc4
86 files changed
+377
-916
No files matched your search
@@ -3,15 +3,5 @@
|
||||
<PropertyGroup>
|
||||
<StrongNameKeyId>Microsoft</StrongNameKeyId>
|
||||
<SupportedOSPlatforms>windows</SupportedOSPlatforms>
|
||||
<PackageDescription>Provides types for managing access and audit control lists for files and directories.
|
||||
|
||||
Commonly Used Types:
|
||||
System.Security.AccessControl.DirectoryObjectSecurity
|
||||
System.Security.AccessControl.DirectorySecurity
|
||||
System.Security.AccessControl.FileSecurity
|
||||
System.Security.AccessControl.FileSystemAccessRule
|
||||
System.Security.AccessControl.FileSystemAuditRule
|
||||
System.Security.AccessControl.FileSystemRights
|
||||
System.Security.AccessControl.FileSystemSecurity</PackageDescription>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -1,12 +0,0 @@
|
||||
<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>
|
||||
-12
@@ -1,12 +0,0 @@
|
||||
<Project DefaultTargets="Build">
|
||||
<Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.props))" />
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\ref\System.IO.FileSystem.AccessControl.csproj">
|
||||
<SupportedFramework>net461;netcoreapp2.0;uap10.0.16299;$(AllXamarinFrameworks)</SupportedFramework>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\src\System.IO.FileSystem.AccessControl.csproj" />
|
||||
<!-- Exclude TFMs that aren't supported by the package anymore from validation. -->
|
||||
<ExcludeHarvestedSupportedFramework Include="netcoreapp1.0;netcoreapp1.1;netcore50;uap10.0;net46" />
|
||||
</ItemGroup>
|
||||
<Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.targets))" />
|
||||
</Project>
|
||||
-23
@@ -1,23 +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.
|
||||
// ------------------------------------------------------------------------------
|
||||
|
||||
namespace System.IO
|
||||
{
|
||||
public static partial class FileSystemAclExtensions
|
||||
{
|
||||
public static void Create(this System.IO.DirectoryInfo directoryInfo, System.Security.AccessControl.DirectorySecurity directorySecurity) { }
|
||||
public static System.IO.FileStream Create(this System.IO.FileInfo fileInfo, System.IO.FileMode mode, System.Security.AccessControl.FileSystemRights rights, System.IO.FileShare share, int bufferSize, System.IO.FileOptions options, System.Security.AccessControl.FileSecurity fileSecurity) { throw null; }
|
||||
public static System.IO.DirectoryInfo CreateDirectory(this System.Security.AccessControl.DirectorySecurity directorySecurity, string path) { throw null; }
|
||||
public static System.Security.AccessControl.DirectorySecurity GetAccessControl(this System.IO.DirectoryInfo directoryInfo) { throw null; }
|
||||
public static System.Security.AccessControl.DirectorySecurity GetAccessControl(this System.IO.DirectoryInfo directoryInfo, System.Security.AccessControl.AccessControlSections includeSections) { throw null; }
|
||||
public static System.Security.AccessControl.FileSecurity GetAccessControl(this System.IO.FileInfo fileInfo) { throw null; }
|
||||
public static System.Security.AccessControl.FileSecurity GetAccessControl(this System.IO.FileInfo fileInfo, System.Security.AccessControl.AccessControlSections includeSections) { throw null; }
|
||||
public static System.Security.AccessControl.FileSecurity GetAccessControl(this System.IO.FileStream fileStream) { throw null; }
|
||||
public static void SetAccessControl(this System.IO.DirectoryInfo directoryInfo, System.Security.AccessControl.DirectorySecurity directorySecurity) { }
|
||||
public static void SetAccessControl(this System.IO.FileInfo fileInfo, System.Security.AccessControl.FileSecurity fileSecurity) { }
|
||||
public static void SetAccessControl(this System.IO.FileStream fileStream, System.Security.AccessControl.FileSecurity fileSecurity) { }
|
||||
}
|
||||
}
|
||||
+17
@@ -4,6 +4,23 @@
|
||||
// Changes to this file must follow the https://aka.ms/api-review process.
|
||||
// ------------------------------------------------------------------------------
|
||||
|
||||
namespace System.IO
|
||||
{
|
||||
public static partial class FileSystemAclExtensions
|
||||
{
|
||||
public static void Create(this System.IO.DirectoryInfo directoryInfo, System.Security.AccessControl.DirectorySecurity directorySecurity) { }
|
||||
public static System.IO.FileStream Create(this System.IO.FileInfo fileInfo, System.IO.FileMode mode, System.Security.AccessControl.FileSystemRights rights, System.IO.FileShare share, int bufferSize, System.IO.FileOptions options, System.Security.AccessControl.FileSecurity fileSecurity) { throw null; }
|
||||
public static System.IO.DirectoryInfo CreateDirectory(this System.Security.AccessControl.DirectorySecurity directorySecurity, string path) { throw null; }
|
||||
public static System.Security.AccessControl.DirectorySecurity GetAccessControl(this System.IO.DirectoryInfo directoryInfo) { throw null; }
|
||||
public static System.Security.AccessControl.DirectorySecurity GetAccessControl(this System.IO.DirectoryInfo directoryInfo, System.Security.AccessControl.AccessControlSections includeSections) { throw null; }
|
||||
public static System.Security.AccessControl.FileSecurity GetAccessControl(this System.IO.FileInfo fileInfo) { throw null; }
|
||||
public static System.Security.AccessControl.FileSecurity GetAccessControl(this System.IO.FileInfo fileInfo, System.Security.AccessControl.AccessControlSections includeSections) { throw null; }
|
||||
public static System.Security.AccessControl.FileSecurity GetAccessControl(this System.IO.FileStream fileStream) { throw null; }
|
||||
public static void SetAccessControl(this System.IO.DirectoryInfo directoryInfo, System.Security.AccessControl.DirectorySecurity directorySecurity) { }
|
||||
public static void SetAccessControl(this System.IO.FileInfo fileInfo, System.Security.AccessControl.FileSecurity fileSecurity) { }
|
||||
public static void SetAccessControl(this System.IO.FileStream fileStream, System.Security.AccessControl.FileSecurity fileSecurity) { }
|
||||
}
|
||||
}
|
||||
namespace System.Security.AccessControl
|
||||
{
|
||||
public abstract partial class DirectoryObjectSecurity : System.Security.AccessControl.ObjectSecurity
|
||||
|
||||
+4
-11
@@ -1,20 +1,13 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>$(NetCoreAppCurrent);netstandard2.0;net461</TargetFrameworks>
|
||||
<TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="System.IO.FileSystem.AccessControl.FileSystemAclExtensions.cs" />
|
||||
<Compile Condition="'$(TargetFramework)' != 'net461'" Include="System.IO.FileSystem.AccessControl.cs" />
|
||||
<Compile Condition="'$(TargetFramework)' == 'net461'" Include="System.IO.FileSystem.AccessControl.net461.cs" />
|
||||
<Compile Include="System.IO.FileSystem.AccessControl.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition="'$(TargetFramework)' != 'net461'">
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="$(LibrariesProjectRoot)System.IO.FileSystem\ref\System.IO.FileSystem.csproj" />
|
||||
<ProjectReference Include="$(LibrariesProjectRoot)System.Security.AccessControl\ref\System.Security.AccessControl.csproj" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
|
||||
<ProjectReference Include="$(LibrariesProjectRoot)System.Security.Principal.Windows\ref\System.Security.Principal.Windows.csproj" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition="'$(TargetFramework)' == '$(NetCoreAppCurrent)'">
|
||||
<ProjectReference Include="$(LibrariesProjectRoot)System.IO.FileSystem\ref\System.IO.FileSystem.csproj" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
-15
@@ -1,15 +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.
|
||||
// ------------------------------------------------------------------------------
|
||||
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
[assembly: TypeForwardedTo(typeof(System.Security.AccessControl.DirectoryObjectSecurity))]
|
||||
[assembly: TypeForwardedTo(typeof(System.Security.AccessControl.DirectorySecurity))]
|
||||
[assembly: TypeForwardedTo(typeof(System.Security.AccessControl.FileSecurity))]
|
||||
[assembly: TypeForwardedTo(typeof(System.Security.AccessControl.FileSystemAccessRule))]
|
||||
[assembly: TypeForwardedTo(typeof(System.Security.AccessControl.FileSystemAuditRule))]
|
||||
[assembly: TypeForwardedTo(typeof(System.Security.AccessControl.FileSystemRights))]
|
||||
[assembly: TypeForwardedTo(typeof(System.Security.AccessControl.FileSystemSecurity))]
|
||||
+3
-18
@@ -1,20 +1,15 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>$(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent);netstandard2.0-windows;netstandard2.0;net461-windows</TargetFrameworks>
|
||||
<TargetFrameworks>$(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent)</TargetFrameworks>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
<!-- DesignTimeBuild requires all the TargetFramework Derived Properties to not be present in the first property group. -->
|
||||
<PropertyGroup>
|
||||
<IsPartialFacadeAssembly Condition="$(TargetFramework.StartsWith('net4'))">true</IsPartialFacadeAssembly>
|
||||
<AllowUnsafeBlocks Condition="'$(TargetsWindows)' == 'true'">true</AllowUnsafeBlocks>
|
||||
<GeneratePlatformNotSupportedAssemblyMessage Condition="'$(TargetsWindows)' != 'true'">SR.PlatformNotSupported_AccessControl</GeneratePlatformNotSupportedAssemblyMessage>
|
||||
</PropertyGroup>
|
||||
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' != '.NETCoreApp'">
|
||||
<Compile Include="$(CoreLibSharedDir)System\Runtime\InteropServices\SuppressGCTransitionAttribute.cs"
|
||||
Link="System\Runtime\InteropServices\SuppressGCTransitionAttribute.cs" />
|
||||
</ItemGroup>
|
||||
<!-- Source includes -->
|
||||
<ItemGroup Condition="'$(IsPartialFacadeAssembly)' != 'true' and '$(TargetsWindows)' == 'true'">
|
||||
<ItemGroup Condition="'$(TargetsWindows)' == 'true'">
|
||||
<Compile Include="$(CommonPath)Interop\Windows\Interop.Errors.cs"
|
||||
Link="Common\Interop\Windows\Interop.Errors.cs" />
|
||||
<Compile Include="$(CommonPath)System\NotImplemented.cs"
|
||||
@@ -90,14 +85,9 @@
|
||||
<Compile Include="$(CommonPath)System\IO\FileSystem.DirectoryCreation.Windows.cs"
|
||||
Link="Common\System\IO\FileSystem.DirectoryCreation.Windows.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition="'$(IsPartialFacadeAssembly)' == 'true'">
|
||||
<Compile Include="System\IO\FileSystemAclExtensions.net46.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition="'$(IsPartialFacadeAssembly)' != 'true'">
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="$(LibrariesProjectRoot)System.Security.AccessControl\src\System.Security.AccessControl.csproj" />
|
||||
<ProjectReference Include="$(LibrariesProjectRoot)System.Security.Principal.Windows\src\System.Security.Principal.Windows.csproj" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp'">
|
||||
<Reference Include="System.Buffers" Condition="'$(TargetsWindows)' == 'true'" />
|
||||
<Reference Include="System.Collections" Condition="'$(TargetsWindows)' == 'true'" />
|
||||
<Reference Include="System.Collections.NonGeneric" />
|
||||
@@ -111,9 +101,4 @@
|
||||
<Reference Include="System.Runtime.InteropServices" Condition="'$(TargetsWindows)' == 'true'" />
|
||||
<Reference Include="System.Threading.Tasks" Condition="'$(TargetsWindows)' == 'true'" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETStandard'">
|
||||
<PackageReference Include="System.Buffers" Version="$(SystemBuffersVersion)" />
|
||||
<PackageReference Include="System.Memory" Version="$(SystemMemoryVersion)" />
|
||||
<ProjectReference Include="$(LibrariesProjectRoot)System.Runtime.CompilerServices.Unsafe\src\System.Runtime.CompilerServices.Unsafe.ilproj" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
-119
@@ -1,119 +0,0 @@
|
||||
// Licensed to the .NET Foundation under one or more agreements.
|
||||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
|
||||
using System.Security.AccessControl;
|
||||
|
||||
namespace System.IO
|
||||
{
|
||||
public static class FileSystemAclExtensions
|
||||
{
|
||||
public static FileStream Create(this FileInfo fileInfo, FileMode mode, FileSystemRights rights, FileShare share, int bufferSize, FileOptions options, FileSecurity fileSecurity)
|
||||
{
|
||||
if (fileInfo == null)
|
||||
throw new ArgumentNullException(nameof(fileInfo));
|
||||
|
||||
if (fileSecurity == null)
|
||||
throw new ArgumentNullException(nameof(fileSecurity));
|
||||
|
||||
return new FileStream(fileInfo.FullName, mode, rights, share, bufferSize, options, fileSecurity);
|
||||
}
|
||||
|
||||
public static void Create(this DirectoryInfo directoryInfo, DirectorySecurity directorySecurity)
|
||||
{
|
||||
if (directoryInfo == null)
|
||||
throw new ArgumentNullException(nameof(directoryInfo));
|
||||
|
||||
if (directorySecurity == null)
|
||||
throw new ArgumentNullException(nameof(directorySecurity));
|
||||
|
||||
directoryInfo.Create(directorySecurity);
|
||||
}
|
||||
|
||||
public static DirectoryInfo CreateDirectory(this DirectorySecurity directorySecurity, string path)
|
||||
{
|
||||
if (directorySecurity == null)
|
||||
throw new ArgumentNullException(nameof(directorySecurity));
|
||||
|
||||
if (path == null)
|
||||
throw new ArgumentNullException(nameof(path));
|
||||
|
||||
if (path.Length == 0)
|
||||
throw new ArgumentException(SR.Arg_PathEmpty);
|
||||
|
||||
return Directory.CreateDirectory(path, directorySecurity);
|
||||
}
|
||||
|
||||
public static DirectorySecurity GetAccessControl(this DirectoryInfo directoryInfo)
|
||||
{
|
||||
if (directoryInfo == null)
|
||||
throw new ArgumentNullException(nameof(directoryInfo));
|
||||
|
||||
return directoryInfo.GetAccessControl();
|
||||
}
|
||||
|
||||
public static DirectorySecurity GetAccessControl(this DirectoryInfo directoryInfo, AccessControlSections includeSections)
|
||||
{
|
||||
if (directoryInfo == null)
|
||||
throw new ArgumentNullException(nameof(directoryInfo));
|
||||
|
||||
return directoryInfo.GetAccessControl(includeSections);
|
||||
}
|
||||
|
||||
public static void SetAccessControl(this DirectoryInfo directoryInfo, DirectorySecurity directorySecurity)
|
||||
{
|
||||
if (directoryInfo == null)
|
||||
throw new ArgumentNullException(nameof(directoryInfo));
|
||||
|
||||
if (directorySecurity == null)
|
||||
throw new ArgumentNullException(nameof(directorySecurity));
|
||||
|
||||
directoryInfo.SetAccessControl(directorySecurity);
|
||||
}
|
||||
|
||||
public static FileSecurity GetAccessControl(this FileInfo fileInfo)
|
||||
{
|
||||
if (fileInfo == null)
|
||||
throw new ArgumentNullException(nameof(fileInfo));
|
||||
|
||||
return fileInfo.GetAccessControl();
|
||||
}
|
||||
|
||||
public static FileSecurity GetAccessControl(this FileInfo fileInfo, AccessControlSections includeSections)
|
||||
{
|
||||
if (fileInfo == null)
|
||||
throw new ArgumentNullException(nameof(fileInfo));
|
||||
|
||||
return fileInfo.GetAccessControl(includeSections);
|
||||
}
|
||||
|
||||
public static void SetAccessControl(this FileInfo fileInfo, FileSecurity fileSecurity)
|
||||
{
|
||||
if (fileInfo == null)
|
||||
throw new ArgumentNullException(nameof(fileInfo));
|
||||
|
||||
if (fileSecurity == null)
|
||||
throw new ArgumentNullException(nameof(fileSecurity));
|
||||
|
||||
fileInfo.SetAccessControl(fileSecurity);
|
||||
}
|
||||
|
||||
public static FileSecurity GetAccessControl(this FileStream fileStream)
|
||||
{
|
||||
if (fileStream == null)
|
||||
throw new ArgumentNullException(nameof(fileStream));
|
||||
|
||||
return fileStream.GetAccessControl();
|
||||
}
|
||||
|
||||
public static void SetAccessControl(this FileStream fileStream, FileSecurity fileSecurity)
|
||||
{
|
||||
if (fileStream == null)
|
||||
throw new ArgumentNullException(nameof(fileStream));
|
||||
|
||||
if (fileSecurity == null)
|
||||
throw new ArgumentNullException(nameof(fileSecurity));
|
||||
|
||||
fileStream.SetAccessControl(fileSecurity);
|
||||
}
|
||||
}
|
||||
}
|
||||
+1
-6
@@ -1,6 +1,6 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>$(NetCoreAppCurrent)-windows;net461-windows</TargetFrameworks>
|
||||
<TargetFrameworks>$(NetCoreAppCurrent)-windows</TargetFrameworks>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="DirectoryObjectSecurityTests.cs" />
|
||||
@@ -17,11 +17,6 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\src\System.IO.FileSystem.AccessControl.csproj" SkipUseReferenceAssembly="true" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition="$(TargetFramework.StartsWith('$(NetCoreAppCurrent)'))">
|
||||
<ProjectReference Include="$(LibrariesProjectRoot)System.DirectoryServices\src\System.DirectoryServices.csproj" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition="'$(TargetFramework)' == 'net461'">
|
||||
<Reference Include="System.DirectoryServices" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
Reference in new issue
Block a user