and '$(IsFrameworkSupportFacade)' != 'true'
and '$(IsSourceProject)' == 'true'
and '$(MSBuildProjectExtension)' == '.csproj'
- and '$(TargetFrameworkIdentifier)' == '.NETStandard'" />
+ and ('$(TargetFrameworkIdentifier)' == '.NETStandard' or '$(TargetFrameworkIdentifier)' == '.NETFramework')" />
</ItemGroup>
<!-- Use this complex ItemGroup-based filtering to add the ProjectReference to make sure dotnet/runtime stays compatible with NuGet Static Graph Restore. -->
{
internal static partial class Advapi32
{
- [DllImport(Interop.Libraries.Advapi32, CharSet = CharSet.Unicode, SetLastError = true, BestFitMapping = false)]
- internal static extern bool ConvertStringSecurityDescriptorToSecurityDescriptor(
- string StringSecurityDescriptor,
- int StringSDRevision,
- out SafeLocalAllocHandle pSecurityDescriptor,
- IntPtr SecurityDescriptorSize);
+ [GeneratedDllImport(Interop.Libraries.Advapi32, CharSet = CharSet.Unicode, SetLastError = true)]
+ internal static partial bool ConvertStringSecurityDescriptorToSecurityDescriptor(
+ string StringSecurityDescriptor,
+ int StringSDRevision,
+ out SafeLocalAllocHandle pSecurityDescriptor,
+ IntPtr SecurityDescriptorSize);
}
}
{
internal static partial class Advapi32
{
- [DllImport(Interop.Libraries.Advapi32, EntryPoint = "GetSecurityDescriptorLength", CallingConvention = CallingConvention.Winapi,
- CharSet = CharSet.Unicode, ExactSpelling = true)]
- internal static extern /*DWORD*/ uint GetSecurityDescriptorLength(IntPtr byteArray);
+ [GeneratedDllImport(Libraries.Advapi32, EntryPoint = "GetSecurityDescriptorLength", CharSet = CharSet.Unicode, ExactSpelling = true)]
+ internal static partial uint GetSecurityDescriptorLength(IntPtr byteArray);
}
}
{
internal static partial class Advapi32
{
-#if DLLIMPORTGENERATOR_ENABLED
[GeneratedDllImport(Interop.Libraries.Advapi32, SetLastError = true)]
internal static partial bool GetTokenInformation(
-#else
- [DllImport(Interop.Libraries.Advapi32, SetLastError = true)]
- internal static extern bool GetTokenInformation(
-#endif
SafeAccessTokenHandle TokenHandle,
uint TokenInformationClass,
SafeLocalAllocHandle TokenInformation,
uint TokenInformationLength,
out uint ReturnLength);
-#if DLLIMPORTGENERATOR_ENABLED
[GeneratedDllImport(Interop.Libraries.Advapi32, SetLastError = true)]
internal static partial bool GetTokenInformation(
-#else
- [DllImport(Interop.Libraries.Advapi32, SetLastError = true)]
- internal static extern bool GetTokenInformation(
-#endif
IntPtr TokenHandle,
uint TokenInformationClass,
SafeLocalAllocHandle TokenInformation,
uint TokenInformationLength,
out uint ReturnLength);
-#if DLLIMPORTGENERATOR_ENABLED
- [GeneratedDllImport(Interop.Libraries.Advapi32, CharSet = CharSet.Unicode, SetLastError = true)]
+ [GeneratedDllImport(Interop.Libraries.Advapi32, SetLastError = true)]
internal static partial bool GetTokenInformation(
-#else
- [DllImport(Interop.Libraries.Advapi32, CharSet = CharSet.Unicode, SetLastError = true)]
- internal static extern bool GetTokenInformation(
-#endif
IntPtr TokenHandle,
uint TokenInformationClass,
IntPtr TokenInformation,
{
internal static partial class Advapi32
{
- [DllImport(Interop.Libraries.Advapi32, SetLastError = false)]
- internal static extern uint LsaNtStatusToWinError(uint status);
+ [GeneratedDllImport(Interop.Libraries.Advapi32, SetLastError = false)]
+ internal static partial uint LsaNtStatusToWinError(uint status);
}
}
{
internal static partial class Advapi32
{
- [DllImport(Libraries.Advapi32)]
- internal static extern int RegCloseKey(IntPtr hKey);
+ [GeneratedDllImport(Libraries.Advapi32)]
+ internal static partial int RegCloseKey(IntPtr hKey);
}
}
{
internal static partial class Advapi32
{
-#if DLLIMPORTGENERATOR_ENABLED
[GeneratedDllImport(Libraries.Advapi32, EntryPoint = "RegConnectRegistryW", CharSet = CharSet.Unicode)]
internal static partial int RegConnectRegistry(
-#else
- [DllImport(Libraries.Advapi32, EntryPoint = "RegConnectRegistryW", CharSet = CharSet.Unicode, BestFitMapping = false)]
- internal static extern int RegConnectRegistry(
-#endif
string machineName,
SafeRegistryHandle key,
out SafeRegistryHandle result);
{
internal static partial class Advapi32
{
- [DllImport(Libraries.Advapi32, CharSet = CharSet.Unicode, BestFitMapping = false, EntryPoint = "RegEnumKeyExW", ExactSpelling = true)]
- internal static extern int RegEnumKeyEx(
+ [GeneratedDllImport(Libraries.Advapi32, EntryPoint = "RegEnumKeyExW", CharSet = CharSet.Unicode, ExactSpelling = true)]
+ internal static partial int RegEnumKeyEx(
SafeRegistryHandle hKey,
int dwIndex,
- char[] lpName,
+ [Out] char[] lpName,
ref int lpcbName,
int[]? lpReserved,
[Out] char[]? lpClass,
{
internal static partial class Advapi32
{
- [DllImport(Libraries.Advapi32, CharSet = CharSet.Unicode, BestFitMapping = false, EntryPoint = "RegEnumValueW", ExactSpelling = true)]
- internal static extern int RegEnumValue(
+ [GeneratedDllImport(Libraries.Advapi32, EntryPoint = "RegEnumValueW", CharSet = CharSet.Unicode, ExactSpelling = true)]
+ internal static partial int RegEnumValue(
SafeRegistryHandle hKey,
int dwIndex,
- char[] lpValueName,
+ [Out] char[] lpValueName,
ref int lpcbValueName,
IntPtr lpReserved_MustBeZero,
int[]? lpType,
{
internal static partial class Advapi32
{
- [DllImport(Libraries.Advapi32, CharSet = CharSet.Unicode, BestFitMapping = false, EntryPoint = "RegQueryInfoKeyW")]
- internal static extern int RegQueryInfoKey(
+ [GeneratedDllImport(Libraries.Advapi32, EntryPoint = "RegQueryInfoKeyW", CharSet = CharSet.Unicode, ExactSpelling = true)]
+ internal static partial int RegQueryInfoKey(
SafeRegistryHandle hKey,
[Out] char[]? lpClass,
int[]? lpcbClass,
{
internal static partial class Advapi32
{
- [DllImport(Libraries.Advapi32, CharSet = CharSet.Unicode, BestFitMapping = false, EntryPoint = "RegQueryValueExW", ExactSpelling = true)]
- internal static extern int RegQueryValueEx(
+ [GeneratedDllImport(Libraries.Advapi32, EntryPoint = "RegQueryValueExW", CharSet = CharSet.Unicode, ExactSpelling = true)]
+ internal static partial int RegQueryValueEx(
SafeRegistryHandle hKey,
string? lpValueName,
int[]? lpReserved,
ref int lpType,
- [Out] byte[]? lpData,
+ byte[]? lpData,
ref int lpcbData);
- [DllImport(Libraries.Advapi32, CharSet = CharSet.Unicode, BestFitMapping = false, EntryPoint = "RegQueryValueExW", ExactSpelling = true)]
- internal static extern int RegQueryValueEx(
+ [GeneratedDllImport(Libraries.Advapi32, EntryPoint = "RegQueryValueExW", CharSet = CharSet.Unicode, ExactSpelling = true)]
+ internal static partial int RegQueryValueEx(
SafeRegistryHandle hKey,
string? lpValueName,
int[]? lpReserved,
ref int lpData,
ref int lpcbData);
- [DllImport(Libraries.Advapi32, CharSet = CharSet.Unicode, BestFitMapping = false, EntryPoint = "RegQueryValueExW", ExactSpelling = true)]
- internal static extern int RegQueryValueEx(
+ [GeneratedDllImport(Libraries.Advapi32, EntryPoint = "RegQueryValueExW", CharSet = CharSet.Unicode, ExactSpelling = true)]
+ internal static partial int RegQueryValueEx(
SafeRegistryHandle hKey,
string? lpValueName,
int[]? lpReserved,
ref long lpData,
ref int lpcbData);
- [DllImport(Libraries.Advapi32, CharSet = CharSet.Unicode, BestFitMapping = false, EntryPoint = "RegQueryValueExW", ExactSpelling = true)]
- internal static extern int RegQueryValueEx(
+ [GeneratedDllImport(Libraries.Advapi32, EntryPoint = "RegQueryValueExW", CharSet = CharSet.Unicode, ExactSpelling = true)]
+ internal static partial int RegQueryValueEx(
SafeRegistryHandle hKey,
string? lpValueName,
int[]? lpReserved,
{
internal static partial class Kernel32
{
-#if DLLIMPORTGENERATOR_ENABLED
- [GeneratedDllImport(Libraries.Kernel32, EntryPoint = "CreateFileMappingW", CharSet = CharSet.Unicode, SetLastError = true)]
+ [GeneratedDllImport(Libraries.Kernel32, EntryPoint = "CreateFileMappingW", CharSet = CharSet.Unicode, ExactSpelling = true, SetLastError = true)]
internal static partial SafeMemoryMappedFileHandle CreateFileMapping(
-#else
- [DllImport(Libraries.Kernel32, EntryPoint = "CreateFileMappingW", CharSet = CharSet.Unicode, SetLastError = true)]
- internal static extern SafeMemoryMappedFileHandle CreateFileMapping(
-#endif
SafeFileHandle hFile,
ref SECURITY_ATTRIBUTES lpFileMappingAttributes,
int flProtect,
int dwMaximumSizeLow,
string? lpName);
-#if DLLIMPORTGENERATOR_ENABLED
- [GeneratedDllImport(Libraries.Kernel32, EntryPoint = "CreateFileMappingW", CharSet = CharSet.Unicode, SetLastError = true)]
+ [GeneratedDllImport(Libraries.Kernel32, EntryPoint = "CreateFileMappingW", CharSet = CharSet.Unicode, ExactSpelling = true, SetLastError = true)]
internal static partial SafeMemoryMappedFileHandle CreateFileMapping(
-#else
- [DllImport(Libraries.Kernel32, EntryPoint = "CreateFileMappingW", CharSet = CharSet.Unicode, SetLastError = true)]
- internal static extern SafeMemoryMappedFileHandle CreateFileMapping(
-#endif
IntPtr hFile,
ref SECURITY_ATTRIBUTES lpFileMappingAttributes,
int flProtect,
{
internal static partial class Kernel32
{
-#if DLLIMPORTGENERATOR_ENABLED
[GeneratedDllImport(Libraries.Kernel32, SetLastError = true)]
internal static partial bool DuplicateHandle(
-#else
- [DllImport(Libraries.Kernel32, SetLastError = true)]
- internal static extern bool DuplicateHandle(
-#endif
IntPtr hSourceProcessHandle,
SafeHandle hSourceHandle,
IntPtr hTargetProcess,
{
internal static partial class Kernel32
{
- [DllImport(Libraries.Kernel32, ExactSpelling = true, SetLastError = true)]
- internal static extern bool FreeLibrary(IntPtr hModule);
+ [GeneratedDllImport(Libraries.Kernel32, ExactSpelling = true, SetLastError = true)]
+ internal static partial bool FreeLibrary(IntPtr hModule);
}
}
{
internal static partial class Kernel32
{
- [DllImport(Libraries.Kernel32, CharSet = CharSet.Unicode, EntryPoint = "GetComputerNameW", ExactSpelling = true)]
- private static unsafe extern int GetComputerName(char* lpBuffer, uint* nSize);
+ [GeneratedDllImport(Libraries.Kernel32, EntryPoint = "GetComputerNameW", CharSet = CharSet.Unicode, ExactSpelling = true)]
+ private static unsafe partial int GetComputerName(char* lpBuffer, uint* nSize);
// maximum length of the NETBIOS name (not including NULL)
private const int MAX_COMPUTERNAME_LENGTH = 15;
{
internal static partial class Kernel32
{
- [DllImport(Libraries.Kernel32)]
- internal static extern IntPtr GetCurrentProcess();
+ [GeneratedDllImport(Libraries.Kernel32)]
+ internal static partial IntPtr GetCurrentProcess();
}
}
{
internal static partial class Kernel32
{
- [DllImport(Libraries.Kernel32)]
- internal static extern uint GetCurrentProcessId();
+ [GeneratedDllImport(Libraries.Kernel32)]
+ internal static partial uint GetCurrentProcessId();
}
}
{
internal static partial class Kernel32
{
- [DllImport(Interop.Libraries.Kernel32)]
- internal static extern IntPtr GetCurrentThread();
+ [GeneratedDllImport(Interop.Libraries.Kernel32)]
+ internal static partial IntPtr GetCurrentThread();
}
}
{
internal static partial class Kernel32
{
-#if DLLIMPORTGENERATOR_ENABLED
[GeneratedDllImport(Libraries.Kernel32, CharSet = CharSet.Unicode, SetLastError = true)]
internal static partial bool GetProcessTimes(
-#else
- [DllImport(Libraries.Kernel32, CharSet = CharSet.Unicode, SetLastError = true)]
- internal static extern bool GetProcessTimes(
-#endif
SafeProcessHandle handle, out long creation, out long exit, out long kernel, out long user);
}
}
{
internal static partial class Kernel32
{
- [DllImport(Libraries.Kernel32, CharSet = CharSet.Unicode, SetLastError = true)]
- public static extern IntPtr LoadLibrary(string libFilename);
+ [GeneratedDllImport(Libraries.Kernel32, CharSet = CharSet.Unicode, SetLastError = true)]
+ public static partial IntPtr LoadLibrary(string libFilename);
}
}
{
internal static partial class Kernel32
{
-#if DLLIMPORTGENERATOR_ENABLED
[GeneratedDllImport(Libraries.Kernel32, EntryPoint = "MapViewOfFile", CharSet = CharSet.Unicode, SetLastError = true)]
internal static partial SafeMemoryMappedViewHandle MapViewOfFile(
-#else
- [DllImport(Libraries.Kernel32, EntryPoint = "MapViewOfFile", CharSet = CharSet.Unicode, SetLastError = true)]
- internal static extern SafeMemoryMappedViewHandle MapViewOfFile(
-#endif
SafeMemoryMappedFileHandle hFileMappingObject,
int dwDesiredAccess,
int dwFileOffsetHigh,
{
internal static partial class Kernel32
{
-#if DLLIMPORTGENERATOR_ENABLED
- [GeneratedDllImport(Libraries.Kernel32, EntryPoint = "OpenFileMappingW", CharSet = CharSet.Unicode, SetLastError = true)]
+ [GeneratedDllImport(Libraries.Kernel32, EntryPoint = "OpenFileMappingW", CharSet = CharSet.Unicode, ExactSpelling = true, SetLastError = true)]
internal static partial SafeMemoryMappedFileHandle OpenFileMapping(
-#else
- [DllImport(Libraries.Kernel32, EntryPoint = "OpenFileMappingW", CharSet = CharSet.Unicode, SetLastError = true)]
- internal static extern SafeMemoryMappedFileHandle OpenFileMapping(
-#endif
int dwDesiredAccess,
[MarshalAs(UnmanagedType.Bool)] bool bInheritHandle,
string lpName);
{
internal static partial class Kernel32
{
-#if DLLIMPORTGENERATOR_ENABLED
[GeneratedDllImport(Libraries.Kernel32, CharSet = CharSet.Unicode, SetLastError = true)]
internal static partial SafeProcessHandle OpenProcess(
-#else
- [DllImport(Libraries.Kernel32, CharSet = CharSet.Unicode, SetLastError = true)]
- internal static extern SafeProcessHandle OpenProcess(
-#endif
int access, bool inherit, int processId);
}
}
{
internal static partial class Kernel32
{
-#if DLLIMPORTGENERATOR_ENABLED
[GeneratedDllImport(Libraries.Kernel32, SetLastError = true)]
internal static partial bool UnmapViewOfFile(IntPtr lpBaseAddress);
-#else
- [DllImport(Libraries.Kernel32, SetLastError = true)]
- internal static extern bool UnmapViewOfFile(IntPtr lpBaseAddress);
-#endif
}
}
{
internal static partial class Kernel32
{
-#if DLLIMPORTGENERATOR_ENABLED
[GeneratedDllImport(Libraries.Kernel32, ExactSpelling = true, SetLastError = true)]
internal static partial UIntPtr VirtualQuery(
-#else
- [DllImport(Libraries.Kernel32, ExactSpelling = true, SetLastError = true)]
- internal static extern UIntPtr VirtualQuery(
-#endif
SafeHandle lpAddress,
ref MEMORY_BASIC_INFORMATION lpBuffer,
UIntPtr dwLength);
{
internal static partial class Kernel32
{
- [DllImport(Libraries.Kernel32, ExactSpelling = true, SetLastError = true)]
- internal static extern int WaitForSingleObject(SafeWaitHandle handle, int timeout);
+ [GeneratedDllImport(Libraries.Kernel32, ExactSpelling = true, SetLastError = true)]
+ internal static partial int WaitForSingleObject(SafeWaitHandle handle, int timeout);
}
}
{
internal static partial class Pdh
{
- [DllImport(Libraries.Pdh, CharSet = CharSet.Unicode)]
- public static extern int PdhFormatFromRawValue(
+ [GeneratedDllImport(Libraries.Pdh, CharSet = CharSet.Unicode)]
+ public static partial int PdhFormatFromRawValue(
uint dwCounterType,
uint dwFormat,
ref long pTimeBase,
{
internal static partial class PerfCounter
{
- [DllImport(Libraries.Advapi32, ExactSpelling = true)]
- internal static extern uint PerfStopProvider(
+ [GeneratedDllImport(Libraries.Advapi32, ExactSpelling = true)]
+ internal static partial uint PerfStopProvider(
IntPtr hProvider
);
internal uint InstanceNameSize;
}
+ // TODO: [DllImportGenerator] Switch to use GeneratedDllImport once we annotate blittable types used in interop in CoreLib (like Guid)
[DllImport(Libraries.Advapi32, ExactSpelling = true)]
internal static extern uint PerfStartProvider(
ref Guid ProviderGuid,
out SafePerfProviderHandle phProvider
);
+ // TODO: [DllImportGenerator] Switch to use GeneratedDllImport once we annotate blittable types used in interop in CoreLib (like Guid)
[DllImport(Libraries.Advapi32, SetLastError = true, ExactSpelling = true, CharSet = CharSet.Unicode)]
internal static extern unsafe PerfCounterSetInstanceStruct* PerfCreateInstance(
SafePerfProviderHandle hProvider,
uint dwInstance
);
- [DllImport(Libraries.Advapi32, ExactSpelling = true)]
- internal static extern unsafe uint PerfSetCounterSetInfo(
+ [GeneratedDllImport(Libraries.Advapi32, ExactSpelling = true)]
+ internal static unsafe partial uint PerfSetCounterSetInfo(
SafePerfProviderHandle hProvider,
PerfCounterSetInfoStruct* pTemplate,
uint dwTemplateSize
);
- [DllImport(Libraries.Advapi32, ExactSpelling = true)]
- internal static extern unsafe uint PerfDeleteInstance(
+ [GeneratedDllImport(Libraries.Advapi32, ExactSpelling = true)]
+ internal static unsafe partial uint PerfDeleteInstance(
SafePerfProviderHandle hProvider,
PerfCounterSetInstanceStruct* InstanceBlock
);
- [DllImport(Libraries.Advapi32, ExactSpelling = true)]
- internal static extern unsafe uint PerfSetCounterRefValue(
+ [GeneratedDllImport(Libraries.Advapi32, ExactSpelling = true)]
+ internal static unsafe partial uint PerfSetCounterRefValue(
SafePerfProviderHandle hProvider,
PerfCounterSetInstanceStruct* pInstance,
uint CounterId,
{
internal static partial class SspiCli
{
- [DllImport(Interop.Libraries.SspiCli)]
- internal static extern int LsaDeregisterLogonProcess(IntPtr LsaHandle);
+ [GeneratedDllImport(Interop.Libraries.SspiCli)]
+ internal static partial int LsaDeregisterLogonProcess(IntPtr LsaHandle);
}
}
string password,
out SafeSspiAuthDataHandle authData);
- // TODO: Switch to use GeneratedDllImport once we annotate blittable types used in interop in CoreLib (like Guid)
+ // TODO: [DllImportGenerator] Switch to use GeneratedDllImport once we annotate blittable types used in interop in CoreLib (like Guid)
[DllImport(Interop.Libraries.SspiCli, CharSet = CharSet.Unicode, ExactSpelling = true, SetLastError = true)]
internal static extern SECURITY_STATUS SetCredentialsAttributesW(
in CredHandle handlePtr,
and instead use runtime checks.
-->
<TargetFrameworks>$(NetCoreAppMinimum);$(NetFrameworkMinimum)</TargetFrameworks>
+ <EnableDllImportGenerator>true</EnableDllImportGenerator>
</PropertyGroup>
<ItemGroup>
<EmbeddedResource Include="$(MSBuildThisFileDirectory)ILLink.Substitutions.AggressiveTrimming.xml"
<Reference Include="System.ComponentModel.Primitives" />
<Reference Include="System.Diagnostics.Debug" />
<Reference Include="System.Diagnostics.Tools" />
+ <Reference Include="System.Memory" />
<Reference Include="System.Resources.ResourceManager" />
<Reference Include="System.Runtime" />
<Reference Include="System.Runtime.Extensions" />
+ <Reference Include="System.Runtime.CompilerServices.Unsafe" />
<Reference Include="System.Runtime.InteropServices" />
<Reference Include="System.Threading" />
<Reference Include="System.Threading.Thread" />
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<TargetFrameworks>$(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent);$(NetCoreAppMinimum)-windows;$(NetCoreAppMinimum);netstandard2.0;$(NetFrameworkMinimum)</TargetFrameworks>
<NoWarn>$(NoWarn);CA1838;CA1847</NoWarn>
+ <!-- Suppressions to avoid ifdefs:
+ CA1845: Use span-based 'string.Concat' and 'AsSpan' instead of 'Substring'
+ CA1846: Prefer 'AsSpan' over 'Substring' when span-based overloads are available -->
+ <NoWarn>$(NoWarn);CA1845;CA1846</NoWarn>
+ <Nullable>annotations</Nullable>
<IsPackable>true</IsPackable>
<PackageDescription>Provides the System.Diagnostics.EventLog class, which allows the applications to use the windows event log service.
<Reference Include="System.Diagnostics.Tools" />
<Reference Include="System.Diagnostics.TraceSource" />
<Reference Include="System.IO.FileSystem" />
+ <Reference Include="System.Memory" />
<Reference Include="System.Runtime" />
<Reference Include="System.Runtime.Extensions" />
+ <Reference Include="System.Runtime.CompilerServices.Unsafe" />
<Reference Include="System.Runtime.InteropServices" />
<Reference Include="System.Resources.ResourceManager" />
<Reference Include="System.Security.Principal.Windows" />
<PropertyGroup>
<TargetFrameworks>$(NetCoreAppCurrent)-windows;$(NetFrameworkMinimum)</TargetFrameworks>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <EnableDllImportGenerator>true</EnableDllImportGenerator>
</PropertyGroup>
<ItemGroup>
<Compile Include="EventInstanceTests.cs" />
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<TargetFrameworks>$(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent);$(NetCoreAppMinimum)-windows;$(NetCoreAppMinimum);netstandard2.0;$(NetFrameworkMinimum)</TargetFrameworks>
<NoWarn>$(NoWarn);CA1847</NoWarn>
+ <Nullable>annotations</Nullable>
<IsPackable>true</IsPackable>
<PackageDescription>Provides the System.Diagnostics.PerformanceCounter class, which allows access to Windows performance counters.
<Reference Include="System.Resources.ResourceManager" />
<Reference Include="System.Runtime" />
<Reference Include="System.Runtime.Extensions" />
+ <Reference Include="System.Runtime.CompilerServices.Unsafe" />
<Reference Include="System.Runtime.InteropServices" />
<Reference Include="System.Security.Claims" />
<Reference Include="System.Security.Principal" />
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
<TargetFrameworks>$(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent)-Unix;$(NetCoreAppCurrent)-Browser</TargetFrameworks>
<IgnoreForCI Condition="'$(TargetOS)' == 'Browser'">true</IgnoreForCI>
+ <EnableDllImportGenerator>true</EnableDllImportGenerator>
</PropertyGroup>
<ItemGroup>
<Compile Include="$(CoreLibSharedDir)System\PasteArguments.cs"
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
<TargetFrameworks>$(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent)-Unix;$(NetCoreAppCurrent)-Browser</TargetFrameworks>
+ <EnableDllImportGenerator>true</EnableDllImportGenerator>
</PropertyGroup>
<ItemGroup>
<Compile Include="MemoryMappedFile.CreateFromFile.Tests.cs" />
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<NoWarn>$(NoWarn);0618</NoWarn>
+ <!-- Suppressins to avoid ifdefs:
+ CA1845: Use span-based 'string.Concat' and 'AsSpan' instead of 'Substring'. -->
+ <NoWarn>$(NoWarn);CA1845</NoWarn>
+ <Nullable>annotations</Nullable>
<IncludeDllSafeSearchPathAttribute>true</IncludeDllSafeSearchPathAttribute>
<TargetFrameworks>$(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent);$(NetCoreAppMinimum)-windows;$(NetCoreAppMinimum);netstandard2.0</TargetFrameworks>
<IsPackable>true</IsPackable>
<Reference Include="System.ComponentModel.Primitives" />
<Reference Include="System.ComponentModel.TypeConverter" />
<Reference Include="System.Diagnostics.Debug" />
+ <Reference Include="System.Memory" />
<Reference Include="System.ObjectModel" />
<Reference Include="System.Resources.ResourceManager" />
<Reference Include="System.Runtime" />
+ <Reference Include="System.Runtime.CompilerServices.Unsafe" />
<Reference Include="System.Runtime.Extensions" />
<Reference Include="System.Runtime.InteropServices" />
<Reference Include="System.Threading" />
<ExternallyShipping>false</ExternallyShipping>
<NoWarn>436</NoWarn> <!-- Type conflicts on "Interop" due to InternalsVisibleTo access -->
<TargetFrameworks>$(NetCoreAppCurrent);$(NetFrameworkMinimum)</TargetFrameworks>
+ <EnableDllImportGenerator>true</EnableDllImportGenerator>
</PropertyGroup>
<ItemGroup>
<Compile Include="$(CommonPath)Interop\Windows\Interop.Libraries.cs"