From e6217f5ec83b5178acc169afb6f0e106f393f978 Mon Sep 17 00:00:00 2001 From: Jan Kotas Date: Thu, 16 Mar 2017 12:47:52 -0700 Subject: [PATCH] Fix CoreCLR build break in shared corelib partition (dotnet/coreclr#2997) Move RelocatedTypeAttribute under PROJECTN ifdef Commit migrated from https://github.com/dotnet/coreclr/commit/d4872c2a6438edf03f775d5892aee0e5b964b405 --- src/coreclr/src/mscorlib/shared/System/IO/FileStream.WinRT.cs | 1 - src/coreclr/src/mscorlib/shared/System/IO/FileStream.cs | 3 +++ src/coreclr/src/mscorlib/shared/System/IO/Path.cs | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/coreclr/src/mscorlib/shared/System/IO/FileStream.WinRT.cs b/src/coreclr/src/mscorlib/shared/System/IO/FileStream.WinRT.cs index 8abd562..9c3f048 100644 --- a/src/coreclr/src/mscorlib/shared/System/IO/FileStream.WinRT.cs +++ b/src/coreclr/src/mscorlib/shared/System/IO/FileStream.WinRT.cs @@ -7,7 +7,6 @@ using System.Runtime.InteropServices; namespace System.IO { - [Internal.Runtime.CompilerServices.RelocatedTypeAttribute("System.IO.FileSystem")] public partial class FileStream : Stream { private SafeFileHandle OpenHandle(FileMode mode, FileShare share, FileOptions options) diff --git a/src/coreclr/src/mscorlib/shared/System/IO/FileStream.cs b/src/coreclr/src/mscorlib/shared/System/IO/FileStream.cs index 7db8518..424170e 100644 --- a/src/coreclr/src/mscorlib/shared/System/IO/FileStream.cs +++ b/src/coreclr/src/mscorlib/shared/System/IO/FileStream.cs @@ -9,6 +9,9 @@ using System.Diagnostics; namespace System.IO { +#if PROJECTN + [Internal.Runtime.CompilerServices.RelocatedTypeAttribute("System.Runtime.Extensions")] +#endif public partial class FileStream : Stream { private const FileShare DefaultShare = FileShare.Read; diff --git a/src/coreclr/src/mscorlib/shared/System/IO/Path.cs b/src/coreclr/src/mscorlib/shared/System/IO/Path.cs index 7f9c978..d26530b 100644 --- a/src/coreclr/src/mscorlib/shared/System/IO/Path.cs +++ b/src/coreclr/src/mscorlib/shared/System/IO/Path.cs @@ -11,7 +11,9 @@ namespace System.IO // Provides methods for processing file system strings in a cross-platform manner. // Most of the methods don't do a complete parsing (such as examining a UNC hostname), // but they will handle most string operations. +#if PROJECTN [Internal.Runtime.CompilerServices.RelocatedTypeAttribute("System.Runtime.Extensions")] +#endif public static partial class Path { // Public static readonly variant of the separators. The Path implementation itself is using -- 2.7.4