Fix CoreCLR build break in shared corelib partition (dotnet/coreclr#2997)
authorJan Kotas <jkotas@microsoft.com>
Thu, 16 Mar 2017 19:47:52 +0000 (12:47 -0700)
committerdotnet-bot <dotnet-bot@microsoft.com>
Thu, 16 Mar 2017 20:32:48 +0000 (20:32 +0000)
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
src/coreclr/src/mscorlib/shared/System/IO/FileStream.cs
src/coreclr/src/mscorlib/shared/System/IO/Path.cs

index 8abd562..9c3f048 100644 (file)
@@ -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)
index 7db8518..424170e 100644 (file)
@@ -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;
index 7f9c978..d26530b 100644 (file)
@@ -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