Skip to content

Commit

Permalink
Enable default compile items for Microsoft.TestPlatform.PlatformAbstr…
Browse files Browse the repository at this point in the history
…actions (#2556)
  • Loading branch information
sharwell committed Sep 3, 2020
1 parent ef1d067 commit 60d87bb
Show file tree
Hide file tree
Showing 40 changed files with 169 additions and 26 deletions.
Expand Up @@ -8,7 +8,6 @@
<AssemblyName>Microsoft.TestPlatform.PlatformAbstractions</AssemblyName>
<TargetFrameworks>netcoreapp2.1;net451;uap10.0;netstandard2.0</TargetFrameworks>
<TargetFrameworks Condition=" '$(DotNetBuildFromSource)' == 'true' ">netstandard2.0;netcoreapp2.1</TargetFrameworks>
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
<EnableCodeAnalysis>true</EnableCodeAnalysis>
<NoWarn>NU1605</NoWarn>
</PropertyGroup>
Expand All @@ -28,16 +27,7 @@
<TargetFrameworkVersion Condition="'$(OS)' != 'Windows_NT'">v4.5.1</TargetFrameworkVersion>
</PropertyGroup>

<ItemGroup>
<Compile Include="Interfaces\**\*.cs" />
<Compile Include="Properties\**\*.cs" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
<Compile Include="netstandard\**\*.cs" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.1' ">
<Compile Include="netcore\**\*.cs" />
<Compile Include="common\**\*.cs" />
<PackageReference Include="System.Threading.Thread">
<Version>4.0.0</Version>
</PackageReference>
Expand All @@ -58,8 +48,6 @@
</PackageReference>
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net451' ">
<Compile Include="net451\**\*.cs" />
<Compile Include="common\**\*.cs" />
<PackageReference Include="Microsoft.Internal.Dia.Interop">
<Version>14.0.0</Version>
</PackageReference>
Expand All @@ -68,7 +56,6 @@
<Reference Include="Microsoft.CSharp" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'uap10.0' ">
<Compile Include="uap10.0\**\*.cs" />
<PackageReference Include="System.Runtime.InteropServices.RuntimeInformation">
<Version>4.0.0</Version>
</PackageReference>
Expand Down
@@ -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;
Expand All @@ -15,4 +17,6 @@ public Stream CreateBufferedStream(Stream stream, int bufferSize)
return new BufferedStream(stream, bufferSize);
}
}
}
}

#endif
@@ -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;
Expand Down Expand Up @@ -215,3 +217,5 @@ public void WaitForProcessExit(object process)
}
}
}

#endif
@@ -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;
Expand Down Expand Up @@ -434,4 +436,6 @@ private static void UnInitializeTrace()
Source.Switch.Level = SourceLevels.Off;
}
}
}
}

#endif
@@ -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;
Expand Down Expand Up @@ -471,4 +473,6 @@ public override void Write(string value)
}
}
}
}
}

#endif
@@ -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;
Expand All @@ -24,4 +26,6 @@ public partial interface IPlatformEqtTrace
/// </param>
void SetupListener(TraceListener listener);
}
}
}

#endif
@@ -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;
Expand All @@ -21,3 +23,5 @@ public static string GetAssemblyLocation(this Assembly assembly)
}
}
}

#endif
@@ -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;
Expand All @@ -22,3 +24,5 @@ public Assembly LoadAssemblyFromPath(string assemblyPath)
}
}
}

#endif
@@ -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;
Expand Down Expand Up @@ -75,3 +77,5 @@ private Assembly AssemblyResolverEvent(object sender, object eventArgs)
}
}
}

#endif
@@ -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;
Expand Down Expand Up @@ -63,3 +65,5 @@ public int GetCurrentManagedThreadId()
}
}
}

#endif
@@ -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;
Expand Down Expand Up @@ -46,3 +48,5 @@ public void Run(Action action, PlatformApartmentState apartmentState, bool waitF
}
}
}

#endif
@@ -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;
Expand All @@ -21,4 +23,6 @@ public IntPtr GetProcessHandle(int processId)
return Process.GetProcessById(processId).Handle;
}
}
}
}

#endif
@@ -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;
Expand All @@ -19,3 +21,5 @@ public static void AddEnvironmentVariable(this ProcessStartInfo startInfo, strin
}
}
}

#endif
@@ -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;
Expand Down Expand Up @@ -73,4 +75,6 @@ public void SetupListener(TraceListener listener)
}
}
}
}
}

#endif
@@ -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;
Expand Down Expand Up @@ -39,3 +41,5 @@ internal void SetupRemoteListeners(TraceListener listener)
}
}
}

#endif
@@ -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;
Expand All @@ -21,3 +23,5 @@ public static string GetAssemblyLocation(this Assembly assembly)
}
}
}

#endif
@@ -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;
Expand All @@ -23,3 +25,5 @@ public Assembly LoadAssemblyFromPath(string assemblyPath)
}
}
}

#endif
@@ -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;
Expand Down Expand Up @@ -77,3 +79,5 @@ private Assembly AssemblyResolverEvent(object sender, object eventArgs)
}
}
}

#endif
@@ -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;
Expand Down Expand Up @@ -68,3 +70,5 @@ public int GetCurrentManagedThreadId()
}
}
}

#endif
@@ -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;
Expand Down Expand Up @@ -49,3 +51,5 @@ public void Run(Action action, PlatformApartmentState apartmentState, bool waitF
}
}
}

#endif
@@ -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;
Expand All @@ -25,4 +27,6 @@ public IntPtr GetProcessHandle(int processId)
return Process.GetProcessById(processId).SafeHandle.DangerousGetHandle();
}
}
}
}

#endif
@@ -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;
Expand All @@ -19,3 +21,5 @@ public static void AddEnvironmentVariable(this ProcessStartInfo startInfo, strin
}
}
}

#endif
@@ -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;
Expand All @@ -16,4 +18,6 @@ public Stream CreateBufferedStream(Stream stream, int bufferSize)
throw new NotImplementedException();
}
}
}
}

#endif

0 comments on commit 60d87bb

Please sign in to comment.