internal static partial class Kernel32
{
[DllImport(Libraries.Kernel32)]
+#if !NO_SUPPRESS_GC_TRANSITION
[SuppressGCTransition]
+#endif
internal static extern IntPtr GetStdHandle(int nStdHandle); // param is NOT a handle, but it returns one!
}
}
<ExcludeCurrentFullFrameworkFromPackage>true</ExcludeCurrentFullFrameworkFromPackage>
<EnableDefaultItems>true</EnableDefaultItems>
<Nullable>annotations</Nullable>
+ <DefineConstants>$(DefineConstants);NO_SUPPRESS_GC_TRANSITION</DefineConstants>
</PropertyGroup>
<PropertyGroup>
<!-- Ensure Assemblies are first resolved via targeting pack when targeting net461 -->
Link="Common\Interop\Windows\Interop.GetStdHandle.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetFramework)' != '$(NetCoreAppCurrent)'">
- <Compile Include="$(CommonPath)System\Runtime\InteropServices\SuppressGCTransitionAttribute.internal.cs"
- Link="Common\System\Runtime\InteropServices\SuppressGCTransitionAttribute.internal.cs" />
- </ItemGroup>
-
<ItemGroup Condition="'$(TargetFramework)' != '$(NetCoreAppCurrent)'">
<Reference Include="System.Buffers" />
<Reference Include="Microsoft.Bcl.AsyncInterfaces" />