diff --git a/src/Microsoft.TestPlatform.PlatformAbstractions/Microsoft.TestPlatform.PlatformAbstractions.csproj b/src/Microsoft.TestPlatform.PlatformAbstractions/Microsoft.TestPlatform.PlatformAbstractions.csproj index e112259a49..322d1f641d 100644 --- a/src/Microsoft.TestPlatform.PlatformAbstractions/Microsoft.TestPlatform.PlatformAbstractions.csproj +++ b/src/Microsoft.TestPlatform.PlatformAbstractions/Microsoft.TestPlatform.PlatformAbstractions.csproj @@ -8,7 +8,6 @@ Microsoft.TestPlatform.PlatformAbstractions netcoreapp2.1;net451;uap10.0;netstandard2.0 netstandard2.0;netcoreapp2.1 - false true NU1605 @@ -28,16 +27,7 @@ v4.5.1 - - - - - - - - - 4.0.0 @@ -58,8 +48,6 @@ - - 14.0.0 @@ -68,7 +56,6 @@ - 4.0.0 diff --git a/src/Microsoft.TestPlatform.PlatformAbstractions/common/IO/PlatformStream.cs b/src/Microsoft.TestPlatform.PlatformAbstractions/common/IO/PlatformStream.cs index fddfab4524..8bfb5768cf 100644 --- a/src/Microsoft.TestPlatform.PlatformAbstractions/common/IO/PlatformStream.cs +++ b/src/Microsoft.TestPlatform.PlatformAbstractions/common/IO/PlatformStream.cs @@ -1,6 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. +#if NETFRAMEWORK || NETCOREAPP + namespace Microsoft.VisualStudio.TestPlatform.PlatformAbstractions { using System.IO; @@ -15,4 +17,6 @@ public Stream CreateBufferedStream(Stream stream, int bufferSize) return new BufferedStream(stream, bufferSize); } } -} \ No newline at end of file +} + +#endif diff --git a/src/Microsoft.TestPlatform.PlatformAbstractions/common/System/ProcessHelper.cs b/src/Microsoft.TestPlatform.PlatformAbstractions/common/System/ProcessHelper.cs index f7c3adb26d..8402e3a793 100644 --- a/src/Microsoft.TestPlatform.PlatformAbstractions/common/System/ProcessHelper.cs +++ b/src/Microsoft.TestPlatform.PlatformAbstractions/common/System/ProcessHelper.cs @@ -1,6 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. +#if NETFRAMEWORK || NETCOREAPP + namespace Microsoft.VisualStudio.TestPlatform.PlatformAbstractions { using System; @@ -215,3 +217,5 @@ public void WaitForProcessExit(object process) } } } + +#endif diff --git a/src/Microsoft.TestPlatform.PlatformAbstractions/common/Tracing/PlatformEqtTrace.cs b/src/Microsoft.TestPlatform.PlatformAbstractions/common/Tracing/PlatformEqtTrace.cs index 9e57066fb9..ddeedfd863 100644 --- a/src/Microsoft.TestPlatform.PlatformAbstractions/common/Tracing/PlatformEqtTrace.cs +++ b/src/Microsoft.TestPlatform.PlatformAbstractions/common/Tracing/PlatformEqtTrace.cs @@ -1,6 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. +#if NETFRAMEWORK || NETCOREAPP + namespace Microsoft.VisualStudio.TestPlatform.ObjectModel { using System; @@ -434,4 +436,6 @@ private static void UnInitializeTrace() Source.Switch.Level = SourceLevels.Off; } } -} \ No newline at end of file +} + +#endif diff --git a/src/Microsoft.TestPlatform.PlatformAbstractions/common/Tracing/RollingFileTraceListener.cs b/src/Microsoft.TestPlatform.PlatformAbstractions/common/Tracing/RollingFileTraceListener.cs index 16c5a6d3b1..6dc9f80445 100644 --- a/src/Microsoft.TestPlatform.PlatformAbstractions/common/Tracing/RollingFileTraceListener.cs +++ b/src/Microsoft.TestPlatform.PlatformAbstractions/common/Tracing/RollingFileTraceListener.cs @@ -1,6 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. +#if NETFRAMEWORK || NETCOREAPP + namespace Microsoft.VisualStudio.TestPlatform.ObjectModel { using System; @@ -471,4 +473,6 @@ public override void Write(string value) } } } -} \ No newline at end of file +} + +#endif diff --git a/src/Microsoft.TestPlatform.PlatformAbstractions/net451/Interfaces/Tracing/IPlatformEqtTrace.cs b/src/Microsoft.TestPlatform.PlatformAbstractions/net451/Interfaces/Tracing/IPlatformEqtTrace.cs index c22cf56c31..446d7f9966 100644 --- a/src/Microsoft.TestPlatform.PlatformAbstractions/net451/Interfaces/Tracing/IPlatformEqtTrace.cs +++ b/src/Microsoft.TestPlatform.PlatformAbstractions/net451/Interfaces/Tracing/IPlatformEqtTrace.cs @@ -1,6 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. +#if NETFRAMEWORK + namespace Microsoft.VisualStudio.TestPlatform.ObjectModel { using System; @@ -24,4 +26,6 @@ public partial interface IPlatformEqtTrace /// void SetupListener(TraceListener listener); } -} \ No newline at end of file +} + +#endif diff --git a/src/Microsoft.TestPlatform.PlatformAbstractions/net451/Runtime/PlatformAssemblyExtensions.cs b/src/Microsoft.TestPlatform.PlatformAbstractions/net451/Runtime/PlatformAssemblyExtensions.cs index f0ccc150c0..180c291d8a 100644 --- a/src/Microsoft.TestPlatform.PlatformAbstractions/net451/Runtime/PlatformAssemblyExtensions.cs +++ b/src/Microsoft.TestPlatform.PlatformAbstractions/net451/Runtime/PlatformAssemblyExtensions.cs @@ -1,6 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. +#if NETFRAMEWORK + namespace Microsoft.VisualStudio.TestPlatform.PlatformAbstractions { using System.Reflection; @@ -21,3 +23,5 @@ public static string GetAssemblyLocation(this Assembly assembly) } } } + +#endif diff --git a/src/Microsoft.TestPlatform.PlatformAbstractions/net451/Runtime/PlatformAssemblyLoadContext.cs b/src/Microsoft.TestPlatform.PlatformAbstractions/net451/Runtime/PlatformAssemblyLoadContext.cs index d5d3401bd5..a8d6ceacbf 100644 --- a/src/Microsoft.TestPlatform.PlatformAbstractions/net451/Runtime/PlatformAssemblyLoadContext.cs +++ b/src/Microsoft.TestPlatform.PlatformAbstractions/net451/Runtime/PlatformAssemblyLoadContext.cs @@ -1,6 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. +#if NETFRAMEWORK + namespace Microsoft.VisualStudio.TestPlatform.PlatformAbstractions { using System.Reflection; @@ -22,3 +24,5 @@ public Assembly LoadAssemblyFromPath(string assemblyPath) } } } + +#endif diff --git a/src/Microsoft.TestPlatform.PlatformAbstractions/net451/Runtime/PlatformAssemblyResolver.cs b/src/Microsoft.TestPlatform.PlatformAbstractions/net451/Runtime/PlatformAssemblyResolver.cs index 172fc3d9ea..fda11d705d 100644 --- a/src/Microsoft.TestPlatform.PlatformAbstractions/net451/Runtime/PlatformAssemblyResolver.cs +++ b/src/Microsoft.TestPlatform.PlatformAbstractions/net451/Runtime/PlatformAssemblyResolver.cs @@ -1,6 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. +#if NETFRAMEWORK + namespace Microsoft.VisualStudio.TestPlatform.PlatformAbstractions { using System; @@ -75,3 +77,5 @@ private Assembly AssemblyResolverEvent(object sender, object eventArgs) } } } + +#endif diff --git a/src/Microsoft.TestPlatform.PlatformAbstractions/net451/System/PlatformEnvironment.cs b/src/Microsoft.TestPlatform.PlatformAbstractions/net451/System/PlatformEnvironment.cs index 291f325b63..4117aa29d3 100644 --- a/src/Microsoft.TestPlatform.PlatformAbstractions/net451/System/PlatformEnvironment.cs +++ b/src/Microsoft.TestPlatform.PlatformAbstractions/net451/System/PlatformEnvironment.cs @@ -1,6 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. +#if NETFRAMEWORK + namespace Microsoft.VisualStudio.TestPlatform.PlatformAbstractions { using System; @@ -63,3 +65,5 @@ public int GetCurrentManagedThreadId() } } } + +#endif diff --git a/src/Microsoft.TestPlatform.PlatformAbstractions/net451/System/PlatformThread.cs b/src/Microsoft.TestPlatform.PlatformAbstractions/net451/System/PlatformThread.cs index bcc76d33b5..37f8b15924 100644 --- a/src/Microsoft.TestPlatform.PlatformAbstractions/net451/System/PlatformThread.cs +++ b/src/Microsoft.TestPlatform.PlatformAbstractions/net451/System/PlatformThread.cs @@ -1,6 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. +#if NETFRAMEWORK + namespace Microsoft.VisualStudio.TestPlatform.PlatformAbstractions { using System; @@ -46,3 +48,5 @@ public void Run(Action action, PlatformApartmentState apartmentState, bool waitF } } } + +#endif diff --git a/src/Microsoft.TestPlatform.PlatformAbstractions/net451/System/ProcessHelper.cs b/src/Microsoft.TestPlatform.PlatformAbstractions/net451/System/ProcessHelper.cs index 6e637d0e03..1ca081ffef 100644 --- a/src/Microsoft.TestPlatform.PlatformAbstractions/net451/System/ProcessHelper.cs +++ b/src/Microsoft.TestPlatform.PlatformAbstractions/net451/System/ProcessHelper.cs @@ -1,6 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. +#if NETFRAMEWORK + namespace Microsoft.VisualStudio.TestPlatform.PlatformAbstractions { using System; @@ -21,4 +23,6 @@ public IntPtr GetProcessHandle(int processId) return Process.GetProcessById(processId).Handle; } } -} \ No newline at end of file +} + +#endif diff --git a/src/Microsoft.TestPlatform.PlatformAbstractions/net451/System/ProcessStartInfoExtensions.cs b/src/Microsoft.TestPlatform.PlatformAbstractions/net451/System/ProcessStartInfoExtensions.cs index 47c0c7ebd4..346342efcb 100644 --- a/src/Microsoft.TestPlatform.PlatformAbstractions/net451/System/ProcessStartInfoExtensions.cs +++ b/src/Microsoft.TestPlatform.PlatformAbstractions/net451/System/ProcessStartInfoExtensions.cs @@ -1,6 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. +#if NETFRAMEWORK + namespace Microsoft.VisualStudio.TestPlatform.PlatformAbstractions { using System.Diagnostics; @@ -19,3 +21,5 @@ public static void AddEnvironmentVariable(this ProcessStartInfo startInfo, strin } } } + +#endif diff --git a/src/Microsoft.TestPlatform.PlatformAbstractions/net451/Tracing/PlatformEqtTrace.cs b/src/Microsoft.TestPlatform.PlatformAbstractions/net451/Tracing/PlatformEqtTrace.cs index 13673d0b43..ab24a8a303 100644 --- a/src/Microsoft.TestPlatform.PlatformAbstractions/net451/Tracing/PlatformEqtTrace.cs +++ b/src/Microsoft.TestPlatform.PlatformAbstractions/net451/Tracing/PlatformEqtTrace.cs @@ -1,6 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. +#if NETFRAMEWORK + namespace Microsoft.VisualStudio.TestPlatform.ObjectModel { using System; @@ -73,4 +75,6 @@ public void SetupListener(TraceListener listener) } } } -} \ No newline at end of file +} + +#endif diff --git a/src/Microsoft.TestPlatform.PlatformAbstractions/net451/Tracing/RemoteEqtTrace.cs b/src/Microsoft.TestPlatform.PlatformAbstractions/net451/Tracing/RemoteEqtTrace.cs index 7ec4cd7285..fa0ce155bb 100644 --- a/src/Microsoft.TestPlatform.PlatformAbstractions/net451/Tracing/RemoteEqtTrace.cs +++ b/src/Microsoft.TestPlatform.PlatformAbstractions/net451/Tracing/RemoteEqtTrace.cs @@ -1,6 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. +#if NETFRAMEWORK + namespace Microsoft.VisualStudio.TestPlatform.ObjectModel { using System; @@ -39,3 +41,5 @@ internal void SetupRemoteListeners(TraceListener listener) } } } + +#endif diff --git a/src/Microsoft.TestPlatform.PlatformAbstractions/netcore/Runtime/PlatformAssemblyExtensions.cs b/src/Microsoft.TestPlatform.PlatformAbstractions/netcore/Runtime/PlatformAssemblyExtensions.cs index f0ccc150c0..fd8a665908 100644 --- a/src/Microsoft.TestPlatform.PlatformAbstractions/netcore/Runtime/PlatformAssemblyExtensions.cs +++ b/src/Microsoft.TestPlatform.PlatformAbstractions/netcore/Runtime/PlatformAssemblyExtensions.cs @@ -1,6 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. +#if NETCOREAPP + namespace Microsoft.VisualStudio.TestPlatform.PlatformAbstractions { using System.Reflection; @@ -21,3 +23,5 @@ public static string GetAssemblyLocation(this Assembly assembly) } } } + +#endif diff --git a/src/Microsoft.TestPlatform.PlatformAbstractions/netcore/Runtime/PlatformAssemblyLoadContext.cs b/src/Microsoft.TestPlatform.PlatformAbstractions/netcore/Runtime/PlatformAssemblyLoadContext.cs index 1c14a2b52c..e364274b1b 100644 --- a/src/Microsoft.TestPlatform.PlatformAbstractions/netcore/Runtime/PlatformAssemblyLoadContext.cs +++ b/src/Microsoft.TestPlatform.PlatformAbstractions/netcore/Runtime/PlatformAssemblyLoadContext.cs @@ -1,6 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. +#if NETCOREAPP + namespace Microsoft.VisualStudio.TestPlatform.PlatformAbstractions { using System.Reflection; @@ -23,3 +25,5 @@ public Assembly LoadAssemblyFromPath(string assemblyPath) } } } + +#endif diff --git a/src/Microsoft.TestPlatform.PlatformAbstractions/netcore/Runtime/PlatformAssemblyResolver.cs b/src/Microsoft.TestPlatform.PlatformAbstractions/netcore/Runtime/PlatformAssemblyResolver.cs index 64f8c69cbf..cf530b492c 100644 --- a/src/Microsoft.TestPlatform.PlatformAbstractions/netcore/Runtime/PlatformAssemblyResolver.cs +++ b/src/Microsoft.TestPlatform.PlatformAbstractions/netcore/Runtime/PlatformAssemblyResolver.cs @@ -1,6 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. +#if NETCOREAPP + namespace Microsoft.VisualStudio.TestPlatform.PlatformAbstractions { using System; @@ -77,3 +79,5 @@ private Assembly AssemblyResolverEvent(object sender, object eventArgs) } } } + +#endif diff --git a/src/Microsoft.TestPlatform.PlatformAbstractions/netcore/System/PlatformEnvironment.cs b/src/Microsoft.TestPlatform.PlatformAbstractions/netcore/System/PlatformEnvironment.cs index f7838de1eb..f791c2f759 100644 --- a/src/Microsoft.TestPlatform.PlatformAbstractions/netcore/System/PlatformEnvironment.cs +++ b/src/Microsoft.TestPlatform.PlatformAbstractions/netcore/System/PlatformEnvironment.cs @@ -1,6 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. +#if NETCOREAPP + namespace Microsoft.VisualStudio.TestPlatform.PlatformAbstractions { using System; @@ -68,3 +70,5 @@ public int GetCurrentManagedThreadId() } } } + +#endif diff --git a/src/Microsoft.TestPlatform.PlatformAbstractions/netcore/System/PlatformThread.cs b/src/Microsoft.TestPlatform.PlatformAbstractions/netcore/System/PlatformThread.cs index 75c61d1fda..671f87fff1 100644 --- a/src/Microsoft.TestPlatform.PlatformAbstractions/netcore/System/PlatformThread.cs +++ b/src/Microsoft.TestPlatform.PlatformAbstractions/netcore/System/PlatformThread.cs @@ -1,6 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. +#if NETCOREAPP + namespace Microsoft.VisualStudio.TestPlatform.PlatformAbstractions { using System; @@ -49,3 +51,5 @@ public void Run(Action action, PlatformApartmentState apartmentState, bool waitF } } } + +#endif diff --git a/src/Microsoft.TestPlatform.PlatformAbstractions/netcore/System/ProcessHelper.cs b/src/Microsoft.TestPlatform.PlatformAbstractions/netcore/System/ProcessHelper.cs index 793671e6e8..74d6cb45a2 100644 --- a/src/Microsoft.TestPlatform.PlatformAbstractions/netcore/System/ProcessHelper.cs +++ b/src/Microsoft.TestPlatform.PlatformAbstractions/netcore/System/ProcessHelper.cs @@ -1,6 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. +#if NETCOREAPP + namespace Microsoft.VisualStudio.TestPlatform.PlatformAbstractions { using System; @@ -25,4 +27,6 @@ public IntPtr GetProcessHandle(int processId) return Process.GetProcessById(processId).SafeHandle.DangerousGetHandle(); } } -} \ No newline at end of file +} + +#endif diff --git a/src/Microsoft.TestPlatform.PlatformAbstractions/netcore/System/ProcessStartInfoExtensions.cs b/src/Microsoft.TestPlatform.PlatformAbstractions/netcore/System/ProcessStartInfoExtensions.cs index 06f2da7077..51c821d981 100644 --- a/src/Microsoft.TestPlatform.PlatformAbstractions/netcore/System/ProcessStartInfoExtensions.cs +++ b/src/Microsoft.TestPlatform.PlatformAbstractions/netcore/System/ProcessStartInfoExtensions.cs @@ -1,6 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. +#if NETCOREAPP + namespace Microsoft.VisualStudio.TestPlatform.PlatformAbstractions { using System.Diagnostics; @@ -19,3 +21,5 @@ public static void AddEnvironmentVariable(this ProcessStartInfo startInfo, strin } } } + +#endif diff --git a/src/Microsoft.TestPlatform.PlatformAbstractions/netstandard/IO/PlatformStream.cs b/src/Microsoft.TestPlatform.PlatformAbstractions/netstandard/IO/PlatformStream.cs index cfcd7260f3..d1bdb9bf12 100644 --- a/src/Microsoft.TestPlatform.PlatformAbstractions/netstandard/IO/PlatformStream.cs +++ b/src/Microsoft.TestPlatform.PlatformAbstractions/netstandard/IO/PlatformStream.cs @@ -1,6 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. +#if NETSTANDARD + namespace Microsoft.VisualStudio.TestPlatform.PlatformAbstractions { using System; @@ -16,4 +18,6 @@ public Stream CreateBufferedStream(Stream stream, int bufferSize) throw new NotImplementedException(); } } -} \ No newline at end of file +} + +#endif diff --git a/src/Microsoft.TestPlatform.PlatformAbstractions/netstandard/Runtime/PlatformAssemblyExtensions.cs b/src/Microsoft.TestPlatform.PlatformAbstractions/netstandard/Runtime/PlatformAssemblyExtensions.cs index fe06b85ae9..f3220e929e 100644 --- a/src/Microsoft.TestPlatform.PlatformAbstractions/netstandard/Runtime/PlatformAssemblyExtensions.cs +++ b/src/Microsoft.TestPlatform.PlatformAbstractions/netstandard/Runtime/PlatformAssemblyExtensions.cs @@ -1,6 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. +#if NETSTANDARD + namespace Microsoft.VisualStudio.TestPlatform.PlatformAbstractions { using System; @@ -14,3 +16,5 @@ public static string GetAssemblyLocation(this Assembly assembly) } } } + +#endif diff --git a/src/Microsoft.TestPlatform.PlatformAbstractions/netstandard/Runtime/PlatformAssemblyLoadContext.cs b/src/Microsoft.TestPlatform.PlatformAbstractions/netstandard/Runtime/PlatformAssemblyLoadContext.cs index 271f03f59a..2a977dfba5 100644 --- a/src/Microsoft.TestPlatform.PlatformAbstractions/netstandard/Runtime/PlatformAssemblyLoadContext.cs +++ b/src/Microsoft.TestPlatform.PlatformAbstractions/netstandard/Runtime/PlatformAssemblyLoadContext.cs @@ -1,6 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. +#if NETSTANDARD + namespace Microsoft.VisualStudio.TestPlatform.PlatformAbstractions { using System.Reflection; @@ -22,3 +24,5 @@ public Assembly LoadAssemblyFromPath(string assemblyPath) } } } + +#endif diff --git a/src/Microsoft.TestPlatform.PlatformAbstractions/netstandard/Runtime/PlatformAssemblyResolver.cs b/src/Microsoft.TestPlatform.PlatformAbstractions/netstandard/Runtime/PlatformAssemblyResolver.cs index 75d1356a00..2cf855ab3f 100644 --- a/src/Microsoft.TestPlatform.PlatformAbstractions/netstandard/Runtime/PlatformAssemblyResolver.cs +++ b/src/Microsoft.TestPlatform.PlatformAbstractions/netstandard/Runtime/PlatformAssemblyResolver.cs @@ -1,6 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. +#if NETSTANDARD + namespace Microsoft.VisualStudio.TestPlatform.PlatformAbstractions { using System; @@ -27,4 +29,6 @@ private void DummyEventThrower() this.AssemblyResolve(this, null); } } -} \ No newline at end of file +} + +#endif diff --git a/src/Microsoft.TestPlatform.PlatformAbstractions/netstandard/System/PlatformEnvironment.cs b/src/Microsoft.TestPlatform.PlatformAbstractions/netstandard/System/PlatformEnvironment.cs index 86a093fcca..82d70519cc 100644 --- a/src/Microsoft.TestPlatform.PlatformAbstractions/netstandard/System/PlatformEnvironment.cs +++ b/src/Microsoft.TestPlatform.PlatformAbstractions/netstandard/System/PlatformEnvironment.cs @@ -1,6 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. +#if NETSTANDARD + namespace Microsoft.VisualStudio.TestPlatform.PlatformAbstractions { using System; @@ -49,3 +51,5 @@ public int GetCurrentManagedThreadId() } } } + +#endif diff --git a/src/Microsoft.TestPlatform.PlatformAbstractions/netstandard/System/PlatformThread.cs b/src/Microsoft.TestPlatform.PlatformAbstractions/netstandard/System/PlatformThread.cs index a08f52e16d..7badae1d99 100644 --- a/src/Microsoft.TestPlatform.PlatformAbstractions/netstandard/System/PlatformThread.cs +++ b/src/Microsoft.TestPlatform.PlatformAbstractions/netstandard/System/PlatformThread.cs @@ -1,6 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. +#if NETSTANDARD + namespace Microsoft.VisualStudio.TestPlatform.PlatformAbstractions { using System; @@ -16,3 +18,5 @@ public void Run(Action action, PlatformApartmentState platformApartmentState, bo } } } + +#endif diff --git a/src/Microsoft.TestPlatform.PlatformAbstractions/netstandard/System/ProcessHelper.cs b/src/Microsoft.TestPlatform.PlatformAbstractions/netstandard/System/ProcessHelper.cs index 35502d01cd..c4d059b45d 100644 --- a/src/Microsoft.TestPlatform.PlatformAbstractions/netstandard/System/ProcessHelper.cs +++ b/src/Microsoft.TestPlatform.PlatformAbstractions/netstandard/System/ProcessHelper.cs @@ -1,6 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. +#if NETSTANDARD + namespace Microsoft.VisualStudio.TestPlatform.PlatformAbstractions { using System; @@ -103,3 +105,5 @@ public IntPtr GetProcessHandle(int processId) } } } + +#endif diff --git a/src/Microsoft.TestPlatform.PlatformAbstractions/netstandard/Tracing/PlatformEqtTrace.cs b/src/Microsoft.TestPlatform.PlatformAbstractions/netstandard/Tracing/PlatformEqtTrace.cs index e4e169f2fd..cbbab0a7c6 100644 --- a/src/Microsoft.TestPlatform.PlatformAbstractions/netstandard/Tracing/PlatformEqtTrace.cs +++ b/src/Microsoft.TestPlatform.PlatformAbstractions/netstandard/Tracing/PlatformEqtTrace.cs @@ -1,6 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. +#if NETSTANDARD + namespace Microsoft.VisualStudio.TestPlatform.ObjectModel { using System; @@ -63,4 +65,6 @@ public PlatformTraceLevel GetTraceLevel() throw new NotImplementedException(); } } -} \ No newline at end of file +} + +#endif diff --git a/src/Microsoft.TestPlatform.PlatformAbstractions/uap10.0/IO/PlatformStream.cs b/src/Microsoft.TestPlatform.PlatformAbstractions/uap10.0/IO/PlatformStream.cs index 0f1f343949..7ed4956de3 100644 --- a/src/Microsoft.TestPlatform.PlatformAbstractions/uap10.0/IO/PlatformStream.cs +++ b/src/Microsoft.TestPlatform.PlatformAbstractions/uap10.0/IO/PlatformStream.cs @@ -1,6 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. +#if WINDOWS_UWP + namespace Microsoft.VisualStudio.TestPlatform.PlatformAbstractions { using System.IO; @@ -15,4 +17,6 @@ public Stream CreateBufferedStream(Stream stream, int bufferSize) return stream; } } -} \ No newline at end of file +} + +#endif diff --git a/src/Microsoft.TestPlatform.PlatformAbstractions/uap10.0/Runtime/PlatformAssemblyExtensions.cs b/src/Microsoft.TestPlatform.PlatformAbstractions/uap10.0/Runtime/PlatformAssemblyExtensions.cs index 68462c6144..71c6da95cc 100644 --- a/src/Microsoft.TestPlatform.PlatformAbstractions/uap10.0/Runtime/PlatformAssemblyExtensions.cs +++ b/src/Microsoft.TestPlatform.PlatformAbstractions/uap10.0/Runtime/PlatformAssemblyExtensions.cs @@ -1,6 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. +#if WINDOWS_UWP + namespace Microsoft.VisualStudio.TestPlatform.PlatformAbstractions { using System.IO; @@ -23,3 +25,5 @@ public static string GetAssemblyLocation(this Assembly assembly) } } } + +#endif diff --git a/src/Microsoft.TestPlatform.PlatformAbstractions/uap10.0/Runtime/PlatformAssemblyLoadContext.cs b/src/Microsoft.TestPlatform.PlatformAbstractions/uap10.0/Runtime/PlatformAssemblyLoadContext.cs index ad15aee56b..e7858222f6 100644 --- a/src/Microsoft.TestPlatform.PlatformAbstractions/uap10.0/Runtime/PlatformAssemblyLoadContext.cs +++ b/src/Microsoft.TestPlatform.PlatformAbstractions/uap10.0/Runtime/PlatformAssemblyLoadContext.cs @@ -1,6 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. +#if WINDOWS_UWP + namespace Microsoft.VisualStudio.TestPlatform.PlatformAbstractions { using System.IO; @@ -24,3 +26,5 @@ public Assembly LoadAssemblyFromPath(string assemblyPath) } } } + +#endif diff --git a/src/Microsoft.TestPlatform.PlatformAbstractions/uap10.0/Runtime/PlatformAssemblyResolver.cs b/src/Microsoft.TestPlatform.PlatformAbstractions/uap10.0/Runtime/PlatformAssemblyResolver.cs index 02f22ead0a..dfcf702806 100644 --- a/src/Microsoft.TestPlatform.PlatformAbstractions/uap10.0/Runtime/PlatformAssemblyResolver.cs +++ b/src/Microsoft.TestPlatform.PlatformAbstractions/uap10.0/Runtime/PlatformAssemblyResolver.cs @@ -1,6 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. +#if WINDOWS_UWP + namespace Microsoft.VisualStudio.TestPlatform.PlatformAbstractions { using Microsoft.VisualStudio.TestPlatform.PlatformAbstractions.Interfaces; @@ -25,4 +27,6 @@ private void DummyEventThrower() this.AssemblyResolve(this, null); } } -} \ No newline at end of file +} + +#endif diff --git a/src/Microsoft.TestPlatform.PlatformAbstractions/uap10.0/System/PlatformEnvironment.cs b/src/Microsoft.TestPlatform.PlatformAbstractions/uap10.0/System/PlatformEnvironment.cs index d1c337aa8d..3952010753 100644 --- a/src/Microsoft.TestPlatform.PlatformAbstractions/uap10.0/System/PlatformEnvironment.cs +++ b/src/Microsoft.TestPlatform.PlatformAbstractions/uap10.0/System/PlatformEnvironment.cs @@ -1,6 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. +#if WINDOWS_UWP + namespace Microsoft.VisualStudio.TestPlatform.PlatformAbstractions { using System; @@ -67,3 +69,5 @@ public int GetCurrentManagedThreadId() } } } + +#endif diff --git a/src/Microsoft.TestPlatform.PlatformAbstractions/uap10.0/System/PlatformThread.cs b/src/Microsoft.TestPlatform.PlatformAbstractions/uap10.0/System/PlatformThread.cs index 8325a3a03b..5ceba42402 100644 --- a/src/Microsoft.TestPlatform.PlatformAbstractions/uap10.0/System/PlatformThread.cs +++ b/src/Microsoft.TestPlatform.PlatformAbstractions/uap10.0/System/PlatformThread.cs @@ -1,6 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. +#if WINDOWS_UWP + namespace Microsoft.VisualStudio.TestPlatform.PlatformAbstractions { using System; @@ -30,3 +32,5 @@ public void Run(Action action, PlatformApartmentState apartmentState, bool waitF } } } + +#endif diff --git a/src/Microsoft.TestPlatform.PlatformAbstractions/uap10.0/System/ProcessHelper.cs b/src/Microsoft.TestPlatform.PlatformAbstractions/uap10.0/System/ProcessHelper.cs index b3696163c1..3dd13d8b7c 100644 --- a/src/Microsoft.TestPlatform.PlatformAbstractions/uap10.0/System/ProcessHelper.cs +++ b/src/Microsoft.TestPlatform.PlatformAbstractions/uap10.0/System/ProcessHelper.cs @@ -1,6 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. +#if WINDOWS_UWP + namespace Microsoft.VisualStudio.TestPlatform.PlatformAbstractions { using System; @@ -109,3 +111,5 @@ public IntPtr GetProcessHandle(int processId) } } } + +#endif diff --git a/src/Microsoft.TestPlatform.PlatformAbstractions/uap10.0/Tracing/FileEventListener.cs b/src/Microsoft.TestPlatform.PlatformAbstractions/uap10.0/Tracing/FileEventListener.cs index 85190c85e3..206a43dd05 100644 --- a/src/Microsoft.TestPlatform.PlatformAbstractions/uap10.0/Tracing/FileEventListener.cs +++ b/src/Microsoft.TestPlatform.PlatformAbstractions/uap10.0/Tracing/FileEventListener.cs @@ -1,6 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. +#if WINDOWS_UWP + namespace Microsoft.VisualStudio.TestPlatform.ObjectModel { using System; @@ -94,3 +96,5 @@ await Task.Run(async () => } } } + +#endif diff --git a/src/Microsoft.TestPlatform.PlatformAbstractions/uap10.0/Tracing/PlatformEqtTrace.cs b/src/Microsoft.TestPlatform.PlatformAbstractions/uap10.0/Tracing/PlatformEqtTrace.cs index 20cdac9b00..15cd7306ce 100644 --- a/src/Microsoft.TestPlatform.PlatformAbstractions/uap10.0/Tracing/PlatformEqtTrace.cs +++ b/src/Microsoft.TestPlatform.PlatformAbstractions/uap10.0/Tracing/PlatformEqtTrace.cs @@ -1,6 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. +#if WINDOWS_UWP + namespace Microsoft.VisualStudio.TestPlatform.ObjectModel { using System; @@ -176,4 +178,6 @@ private void UnInitializeTrace() TraceLevel = PlatformTraceLevel.Off; } } -} \ No newline at end of file +} + +#endif diff --git a/src/Microsoft.TestPlatform.PlatformAbstractions/uap10.0/Tracing/UnitTestEventSource.cs b/src/Microsoft.TestPlatform.PlatformAbstractions/uap10.0/Tracing/UnitTestEventSource.cs index 3757944c73..7bf7fb4fb8 100644 --- a/src/Microsoft.TestPlatform.PlatformAbstractions/uap10.0/Tracing/UnitTestEventSource.cs +++ b/src/Microsoft.TestPlatform.PlatformAbstractions/uap10.0/Tracing/UnitTestEventSource.cs @@ -1,6 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. +#if WINDOWS_UWP + namespace Microsoft.VisualStudio.TestPlatform.ObjectModel { using System.Diagnostics.Tracing; @@ -48,3 +50,5 @@ public void Critical(string message) } } } + +#endif