Skip to content

Commit

Permalink
Fix non-netcoreapp builds
Browse files Browse the repository at this point in the history
Commit migrated from dotnet/corefx@bd5ff7a
  • Loading branch information
stephentoub committed Oct 24, 2019
1 parent 6c1d89a commit 732ea09
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

// Internal copy of SuppressGCTransitionAttribute used only to enable files
// that use this to compile. On any platforms that support this attribute,
// the real one exposed from CoreLib should be used.

namespace System.Runtime.InteropServices
{
[AttributeUsage(AttributeTargets.Method)]
internal sealed class SuppressGCTransitionAttribute : Attribute { }
}
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@
<Compile Include="$(CommonPath)\System\IO\FileSystem.DirectoryCreation.Windows.cs" Link="Common\System\IO\FileSystem.DirectoryCreation.Windows.cs" />
<Compile Include="$(CommonPath)\System\IO\PathInternal.CaseSensitivity.cs" Link="Common\System\IO\PathInternal.CaseSensitivity.cs" />
<Compile Include="$(CommonPath)\System\Memory\FixedBufferExtensions.cs" Link="Common\System\Memory\FixedBufferExtensions.cs" />
<Compile Include="$(CommonPath)\System\Runtime\InteropServices\SuppressGCTransitionAttribute.internal.cs" />
<Compile Include="Microsoft\IO\StringExtensions.cs" />
</ItemGroup>
<ItemGroup Condition="'$(TargetsNetFx)' == 'true'">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,11 @@
<Compile Include="Microsoft\Win32\UserPreferenceChangingEventArgs.cs" />
<Compile Include="Microsoft\Win32\UserPreferenceChangingEventHandler.cs" />
</ItemGroup>
<ItemGroup Condition="'$(TargetGroup)' != 'netcoreapp'">
<Compile Include="$(CommonPath)\System\Runtime\InteropServices\SuppressGCTransitionAttribute.internal.cs">
<Link>Common\System\Runtime\InteropServices\SuppressGCTransitionAttribute.internal.cs</Link>
</Compile>
</ItemGroup>
<ItemGroup Condition="'$(TargetsNetFx)' == 'true'">
<Reference Include="mscorlib" />
<Reference Include="System" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,9 @@
<Compile Include="$(CommonPath)\CoreLib\System\IO\PathInternal.Windows.cs">
<Link>Common\CoreLib\System\IO\PathInternal.Windows.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\System\Runtime\InteropServices\SuppressGCTransitionAttribute.internal.cs" Condition="'$(TargetGroup)' != 'netcoreapp'">
<Link>Common\System\Runtime\InteropServices\SuppressGCTransitionAttribute.internal.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\CoreLib\System\Text\ValueStringBuilder.cs">
<Link>CoreLib\System\Text\ValueStringBuilder.cs</Link>
</Compile>
Expand Down

0 comments on commit 732ea09

Please sign in to comment.