Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VSTest targeting netstandard 2.0 #2067

Merged
merged 33 commits into from
Jul 10, 2019
Merged
Show file tree
Hide file tree
Changes from 31 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
5c9b944
Targeting netstandard2.0
vagisha-nidhi Jun 26, 2019
59e4db5
Fixing test assets targets
vagisha-nidhi Jun 26, 2019
99298ad
Updating scripts
vagisha-nidhi Jun 26, 2019
5c618a0
Fixing build scripts and nuspecs
vagisha-nidhi Jun 27, 2019
bc1649f
Upgrading PlatformAbstractions and build/verify scripts
vagisha-nidhi Jun 27, 2019
f0e0007
Updated failing build script
vagisha-nidhi Jun 27, 2019
adad130
Fixing hostpolicy error
vagisha-nidhi Jun 27, 2019
4cf00e5
Upgrading to netcoreapp2.1
vagisha-nidhi Jun 28, 2019
dff2a3b
script cleanup
vagisha-nidhi Jun 28, 2019
3bb8bb2
Fixing test script
vagisha-nidhi Jun 28, 2019
c4c30cf
Removing failed UTs
vagisha-nidhi Jun 28, 2019
bc2a615
Targeting tracedatacollector unit tests to netcore2.0
vagisha-nidhi Jun 28, 2019
b798c09
Fixing UT and AT
vagisha-nidhi Jun 28, 2019
e610227
dotnet 2.1.0 runtime install
vagisha-nidhi Jul 1, 2019
fe3a06f
runtime install
vagisha-nidhi Jul 1, 2019
18391c9
Removing XPathNavigator.PrependChild
vagisha-nidhi Jul 1, 2019
d35c294
Adding System.Runtime.CompilerServices.Unsafe reference
vagisha-nidhi Jul 1, 2019
5e03cdd
Fixing Platform tests target framework
vagisha-nidhi Jul 1, 2019
d87a69a
Update AssemblyMetaProviderTests
vagisha-nidhi Jul 1, 2019
d38ff0a
cleanup
vagisha-nidhi Jul 1, 2019
7071da2
Smoke tests fixed
vagisha-nidhi Jul 1, 2019
7e76176
script cleanup
vagisha-nidhi Jul 1, 2019
29131a6
References cleanup
vagisha-nidhi Jul 2, 2019
7a9c59d
Updated Microsoft.TestPlatform.Portable.nuspec
vagisha-nidhi Jul 2, 2019
4964d3b
Update verify-nupkgs.ps1
vagisha-nidhi Jul 2, 2019
63d65c2
Removing unsed references
vagisha-nidhi Jul 4, 2019
bdaffa4
Updating testhost package directory
vagisha-nidhi Jul 4, 2019
169d868
Comments addressed
vagisha-nidhi Jul 5, 2019
76ca75d
Skipping flaky vanguard tests
vagisha-nidhi Jul 5, 2019
ba48652
csproj cleanup
vagisha-nidhi Jul 8, 2019
0e1a2f0
Cleanups
vagisha-nidhi Jul 8, 2019
d86b83c
Removing netcore1.0 references from TestAssets
vagisha-nidhi Jul 9, 2019
aab5536
Signing test host core 2.1 assemblies
vagisha-nidhi Jul 10, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 17 additions & 35 deletions scripts/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,8 @@ Write-Verbose "Setup build configuration."
$TPB_Solution = "TestPlatform.sln"
$TPB_TestAssets_Solution = Join-Path $env:TP_ROOT_DIR "test\TestAssets\TestAssets.sln"
$TPB_TargetFramework = "net451"
$TPB_TargetFrameworkCore = "netcoreapp1.0"
$TPB_TargetFrameworkCore20 = "netcoreapp2.0"
$TPB_TargetFrameworkCore20 = "netcoreapp2.1"
$TPB_TargetFrameworkUap = "uap10.0"
$TPB_TargetFrameworkNS1_4 = "netstandard1.4"
$TPB_TargetFrameworkNS2_0 = "netstandard2.0"
$TPB_Configuration = $Configuration
$TPB_TargetRuntime = $TargetRuntime
Expand Down Expand Up @@ -160,19 +158,9 @@ function Install-DotNetCli
& $dotnetInstallScript -Channel "master" -InstallDir $dotnetInstallPath -NoPath -Version $env:DOTNET_CLI_VERSION

# Pull in additional shared frameworks.
# Get netcoreapp1.0 shared components.
if (!(Test-Path "$dotnetInstallPath\shared\Microsoft.NETCore.App\1.0.5")) {
& $dotnetInstallScript -InstallDir $dotnetInstallPath -SharedRuntime -Version '1.0.5' -Channel 'preview'
}

# Get netcoreapp1.1 shared components.
if (!(Test-Path "$dotnetInstallPath\shared\Microsoft.NETCore.App\1.1.2")) {
& $dotnetInstallScript -InstallDir $dotnetInstallPath -SharedRuntime -Version '1.1.2' -Channel 'release/1.1.0'
}

# Get netcoreapp2.0 shared components.
if (!(Test-Path "$dotnetInstallPath\shared\Microsoft.NETCore.App\2.0.0")) {
& $dotnetInstallScript -InstallDir $dotnetInstallPath -SharedRuntime -Version '2.0.0' -Channel 'release/2.0.0'
# Get netcoreapp2.1 shared components.
if (!(Test-Path "$dotnetInstallPath\shared\Microsoft.NETCore.App\2.1.0")) {
& $dotnetInstallScript -InstallDir $dotnetInstallPath -SharedRuntime -Version '2.1.0' -Channel 'release/2.1.0'
}

# Get shared components which is compatible with dotnet cli version $env:DOTNET_CLI_VERSION
Expand Down Expand Up @@ -227,15 +215,14 @@ function Publish-Package
Write-Log "Publish-Package: Started."
$dotnetExe = Get-DotNetPath
$fullCLRPackageDir = Get-FullCLRPackageDirectory
$coreCLRPackageDir = Get-CoreCLRPackageDirectory
$coreCLR20PackageDir = Get-CoreCLR20PackageDirectory
$coreCLR20TestHostPackageDir = Get-CoreCLR20TestHostPackageDirectory
$packageProject = Join-Path $env:TP_PACKAGE_PROJ_DIR "package\package.csproj"
$testHostProject = Join-Path $env:TP_ROOT_DIR "src\testhost\testhost.csproj"
$testHostx86Project = Join-Path $env:TP_ROOT_DIR "src\testhost.x86\testhost.x86.csproj"
$testhostFullPackageDir = $(Join-Path $env:TP_OUT_DIR "$TPB_Configuration\Microsoft.TestPlatform.TestHost\$TPB_TargetFramework\$TPB_TargetRuntime")
$testhostCorePackageDir = $(Join-Path $env:TP_OUT_DIR "$TPB_Configuration\Microsoft.TestPlatform.TestHost\$TPB_TargetFrameworkCore")
$testhostNS1_4PackageDir = $(Join-Path $env:TP_OUT_DIR "$TPB_Configuration\Microsoft.TestPlatform.TestHost\$TPB_TargetFrameworkNS1_4")
$testhostCorePackageDir = $(Join-Path $env:TP_OUT_DIR "$TPB_Configuration\Microsoft.TestPlatform.TestHost\$TPB_TargetFrameworkCore20")
$testhostUapPackageDir = $(Join-Path $env:TP_OUT_DIR "$TPB_Configuration\Microsoft.TestPlatform.TestHost\$TPB_TargetFrameworkUap")
$vstestConsoleProject = Join-Path $env:TP_ROOT_DIR "src\vstest.console\vstest.console.csproj"
$settingsMigratorProject = Join-Path $env:TP_ROOT_DIR "src\SettingsMigrator\SettingsMigrator.csproj"
$dataCollectorProject = Join-Path $env:TP_ROOT_DIR "src\datacollector\datacollector.csproj"
Expand All @@ -262,8 +249,8 @@ function Publish-Package

Write-Log "Package: Publish testhost\testhost.csproj"
Publish-PackageInternal $testHostProject $TPB_TargetFramework $testhostFullPackageDir
Publish-PackageInternal $testHostProject $TPB_TargetFrameworkCore $testhostCorePackageDir
Publish-PackageInternal $testHostProject $TPB_TargetFrameworkNS1_4 $testhostNS1_4PackageDir
Publish-PackageInternal $testHostProject $TPB_TargetFrameworkCore20 $testhostCorePackageDir
Publish-PackageInternal $testHostProject $TPB_TargetFrameworkCore20 $testhostUapPackageDir

Write-Log "Package: Publish testhost.x86\testhost.x86.csproj"
Publish-PackageInternal $testHostx86Project $TPB_TargetFramework $testhostFullPackageDir
Expand All @@ -287,17 +274,17 @@ function Publish-Package
# Publish platform abstractions
$platformAbstraction = Join-Path $env:TP_ROOT_DIR "src\Microsoft.TestPlatform.PlatformAbstractions\bin\$TPB_Configuration"
$platformAbstractionNetFull = Join-Path $platformAbstraction $TPB_TargetFramework
$platformAbstractionNetCore = Join-Path $platformAbstraction $TPB_TargetFrameworkCore
$platformAbstractionNetCore = Join-Path $platformAbstraction $TPB_TargetFrameworkCore20
$platformAbstractionUap = Join-Path $platformAbstraction $TPB_TargetFrameworkUap
Copy-Item $platformAbstractionNetFull\* $fullCLRPackageDir -Force
Copy-Item $platformAbstractionNetCore\* $coreCLR20PackageDir -Force
Copy-Item $platformAbstractionUap\* $testhostNS1_4PackageDir -Force
Copy-Item $platformAbstractionUap\* $testhostUapPackageDir -Force

# Publish msdia
$comComponentsDirectory = Join-Path $env:TP_PACKAGES_DIR "Microsoft.Internal.Dia\14.0.0\contentFiles\any\any\ComComponents"
Copy-Item -Recurse $comComponentsDirectory\* $testhostCorePackageDir -Force
Copy-Item -Recurse $comComponentsDirectory\* $testhostFullPackageDir -Force
Copy-Item -Recurse $comComponentsDirectory\* $testhostNS1_4PackageDir -Force
Copy-Item -Recurse $comComponentsDirectory\* $testhostUapPackageDir -Force
Copy-Item -Recurse $comComponentsDirectory\* $coreCLR20TestHostPackageDir -Force

# Copy over the logger assemblies to the Extensions folder.
Expand Down Expand Up @@ -326,7 +313,7 @@ function Publish-Package
}

# Copy Blame Datacollector to Extensions folder.
$TPB_TargetFrameworkStandard = "netstandard1.5"
$TPB_TargetFrameworkStandard = "netstandard2.0"
$blameDataCollector = Join-Path $env:TP_ROOT_DIR "src\Microsoft.TestPlatform.Extensions.BlameDataCollector\bin\$TPB_Configuration"
$blameDataCollectorNetFull = Join-Path $blameDataCollector $TPB_TargetFramework
$blameDataCollectorNetStandard = Join-Path $blameDataCollector $TPB_TargetFrameworkStandard
Expand Down Expand Up @@ -589,9 +576,9 @@ function Create-NugetPackages
Copy-Item $tpNuspecDir\..\"ThirdPartyNotices.txt" $stagingDir -Force

#Copy Uap target, & props
$testhostNS1_4PackageDir = $(Join-Path $env:TP_OUT_DIR "$TPB_Configuration\Microsoft.TestPlatform.TestHost\$TPB_TargetFrameworkNS1_4")
Copy-Item $tpNuspecDir\uap\"Microsoft.TestPlatform.TestHost.Uap.props" $testhostNS1_4PackageDir\Microsoft.TestPlatform.TestHost.props -Force
Copy-Item $tpNuspecDir\uap\"Microsoft.TestPlatform.TestHost.Uap.targets" $testhostNS1_4PackageDir\Microsoft.TestPlatform.TestHost.targets -Force
$testhostUapPackageDir = $(Join-Path $env:TP_OUT_DIR "$TPB_Configuration\Microsoft.TestPlatform.TestHost\$TPB_TargetFrameworkUap")
Copy-Item $tpNuspecDir\uap\"Microsoft.TestPlatform.TestHost.Uap.props" $testhostUapPackageDir\Microsoft.TestPlatform.TestHost.props -Force
Copy-Item $tpNuspecDir\uap\"Microsoft.TestPlatform.TestHost.Uap.targets" $testhostUapPackageDir\Microsoft.TestPlatform.TestHost.targets -Force

# Call nuget pack on these components.
$nugetExe = Join-Path $env:TP_PACKAGES_DIR -ChildPath "Nuget.CommandLine" | Join-Path -ChildPath $env:NUGET_EXE_Version | Join-Path -ChildPath "tools\NuGet.exe"
Expand Down Expand Up @@ -694,11 +681,6 @@ function Get-FullCLRPackageDirectory
return $(Join-Path $env:TP_OUT_DIR "$TPB_Configuration\$TPB_TargetFramework\$TPB_TargetRuntime")
}

function Get-CoreCLRPackageDirectory
{
return $(Join-Path $env:TP_OUT_DIR "$TPB_Configuration\$TPB_TargetFrameworkCore")
}

function Get-CoreCLR20PackageDirectory
{
return $(Join-Path $env:TP_OUT_DIR "$TPB_Configuration\$TPB_TargetFrameworkCore20")
Expand Down Expand Up @@ -813,7 +795,7 @@ function Build-SpecificProjects
{
Write-Log "Build-SpecificProjects: Started for pattern: $ProjectNamePatterns"
# FrameworksAndOutDirs format ("<target_framework>", "<output_dir>").
$FrameworksAndOutDirs =( ("net451", "net451\win7-x64"), ("netstandard1.5", "netcoreapp2.0"), ("netcoreapp1.0", "netcoreapp2.0"), ("netcoreapp2.0", "netcoreapp2.0"))
$FrameworksAndOutDirs =( ("net451", "net451\win7-x64"), ("netstandard2.0", "netcoreapp2.1"), ("netcoreapp2.1", "netcoreapp2.1"))
$dotnetPath = Get-DotNetPath

# Get projects to build.
Expand Down Expand Up @@ -849,7 +831,7 @@ function Build-SpecificProjects
$fromDir = $([System.IO.Path]::Combine($ProjectDir, "bin", $TPB_Configuration, $FrameworkAndOutDir[0]))
$toDir = $([System.IO.Path]::Combine($env:TP_OUT_DIR, $TPB_Configuration, $FrameworkAndOutDir[1]))
if ( Test-Path $fromDir){
Write-Log "Copying articates from $fromDir to $toDir"
Write-Log "Copying artifacts from $fromDir to $toDir"
Get-ChildItem $fromDir | ForEach-Object {
if(-not ($_.PSIsContainer)) {
copy $_.FullName $toDir
Expand Down
13 changes: 6 additions & 7 deletions scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,7 @@ DOTNET_CLI_VERSION="LATEST"
TPB_Solution="TestPlatform.sln"
TPB_Build_From_Source_Solution="TestPlatform_BuildFromSource.sln"
TPB_TargetFramework="net451"
TPB_TargetFrameworkCore="netcoreapp2.0"
TPB_TargetFrameworkCore10="netcoreapp1.0"
TPB_TargetFrameworkCore="netcoreapp2.1"
TPB_Configuration=$CONFIGURATION
TPB_TargetRuntime=$TARGET_RUNTIME
TPB_Version=$(test -z $VERSION_SUFFIX && echo $VERSION || echo $VERSION-$VERSION_SUFFIX)
Expand Down Expand Up @@ -329,11 +328,11 @@ function publish_package()
cp $newtonsoft $packageDir
done

# Publish TestHost for netcoreapp1.0 target
# Publish TestHost for netcoreapp2.1 target
log ".. Package: Publish testhost.csproj"
local projectToPackage=$TP_ROOT_DIR/src/testhost/testhost.csproj
local packageOutputPath=$TP_OUT_DIR/$TPB_Configuration/Microsoft.TestPlatform.TestHost/$TPB_TargetFrameworkCore10
$dotnet publish $projectToPackage --configuration $TPB_Configuration --framework $TPB_TargetFrameworkCore10 --output $packageOutputPath -v:minimal -p:Version=$TPB_Version -p:CIBuild=$TPB_CIBuild -p:LocalizedBuild=$TPB_LocalizedBuild
local packageOutputPath=$TP_OUT_DIR/$TPB_Configuration/Microsoft.TestPlatform.TestHost/$TPB_TargetFrameworkCore
$dotnet publish $projectToPackage --configuration $TPB_Configuration --framework $TPB_TargetFrameworkCore --output $packageOutputPath -v:minimal -p:Version=$TPB_Version -p:CIBuild=$TPB_CIBuild -p:LocalizedBuild=$TPB_LocalizedBuild

# For libraries that are externally published, copy the output into artifacts. These will be signed and packaged independently.
packageName="Microsoft.TestPlatform.Build"
Expand All @@ -352,10 +351,10 @@ function publishplatformatbstractions()
log "Publish-PlatfromAbstractions-Internal: Started."

local start=$SECONDS
local coreCLRPackageDir=$TP_OUT_DIR/$TPB_Configuration/$TPB_TargetFrameworkCore10
local coreCLRPackageDir=$TP_OUT_DIR/$TPB_Configuration/$TPB_TargetFrameworkCore

local platformAbstraction="$TP_ROOT_DIR/src/Microsoft.TestPlatform.PlatformAbstractions/bin/$TPB_Configuration"
local platformAbstractionNetCore=$platformAbstraction/$TPB_TargetFrameworkCore10
local platformAbstractionNetCore=$platformAbstraction/$TPB_TargetFrameworkCore

cp -r $platformAbstractionNetCore $coreCLRPackageDir

Expand Down
3 changes: 0 additions & 3 deletions scripts/build/TestPlatform.Settings.targets
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@
<!-- Disable default inclusion of .resx file. We generate files in the Resources directory only
if localization is enabled, default inclusion ends up including the generated files by default. -->
<EnableDefaultEmbeddedResourceItems>false</EnableDefaultEmbeddedResourceItems>
<!-- .NetStandardLibrary1.6.0 brings in dependencies which are supported in UWP,
any higher version will bring in dependencies which are not supported by current UWP version -->
<NetStandardImplicitPackageVersion>1.6.0</NetStandardImplicitPackageVersion>
</PropertyGroup>

<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
Expand Down
9 changes: 4 additions & 5 deletions scripts/perf/perf.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Param(
[System.String] $TargetRuntime = "win7-x64",

[Parameter(Mandatory=$false)]
[ValidateSet("netcoreapp1.0", "net451", "net452")]
[ValidateSet("netcoreapp2.1", "net451", "net452")]
[Alias("f")]
[System.String] $TargetFramework,

Expand Down Expand Up @@ -40,12 +40,11 @@ $env:TP_OUT_DIR = Join-Path $env:TP_ROOT_DIR "artifacts"
# Test configuration
#
$TPT_TargetFrameworkFullCLR = "net451"
$TPT_TargetFrameworkCore = "netcoreapp1.0"
$TPT_TargetFramework20Core = "netcoreapp2.0"
$TPT_TargetFramework20Core = "netcoreapp2.1"
Write-Verbose "Setup build configuration."
$Script:TPT_Configuration = $Configuration
$Script:TPT_SourceFolders = @(Join-Path $env:TP_ROOT_DIR "test\TestAssets")
$Script:TPT_TargetFrameworks =@($TPT_TargetFrameworkCore, $TPT_TargetFrameworkFullCLR, "net452")
$Script:TPT_TargetFrameworks =@($TPT_TargetFramework20Core, $TPT_TargetFrameworkFullCLR, "net452")
$Script:TPT_TargetFramework = $TargetFramework
$Script:TPT_TargetRuntime = $TargetRuntime
$Script:TPT_Pattern = $Pattern
Expand Down Expand Up @@ -152,7 +151,7 @@ function Get-ConsoleRunnerPath($runner, $targetFrameWork)
{
if($runner -eq "vstest.console")
{
if($targetFrameWork -eq $TPT_TargetFrameworkCore)
if($targetFrameWork -eq $TPT_TargetFramework20Core)
{
$vstestConsoleFileName = "vstest.console.dll"
$targetRunTime = ""
Expand Down
9 changes: 4 additions & 5 deletions scripts/test.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Param(
[System.String] $TargetRuntime = "win7-x64",

[Parameter(Mandatory=$false)]
[ValidateSet("netcoreapp1.0", "net451", "netcoreapp2.0")]
[ValidateSet("net451", "netcoreapp2.1")]
[Alias("f")]
[System.String] $TargetFramework,

Expand Down Expand Up @@ -75,12 +75,11 @@ $env:NUGET_PACKAGES = $env:TP_PACKAGES_DIR
# Test configuration
#
$TPT_TargetFrameworkFullCLR = "net451"
$TPT_TargetFrameworkCore = "netcoreapp1.0"
$TPT_TargetFrameworkCore20 = "netcoreapp2.0"
$TPT_TargetFrameworkCore20 = "netcoreapp2.1"
Write-Verbose "Setup build configuration."
$Script:TPT_Configuration = $Configuration
$Script:TPT_SourceFolders = @("test")
$Script:TPT_TargetFrameworks =@($TPT_TargetFrameworkCore, $TPT_TargetFrameworkFullCLR, $TPT_TargetFrameworkCore20)
$Script:TPT_TargetFrameworks =@($TPT_TargetFrameworkFullCLR, $TPT_TargetFrameworkCore20)
$Script:TPT_TargetFramework = $TargetFramework
$Script:TPT_TargetRuntime = $TargetRuntime
$Script:TPT_SkipProjects = @("_none_");
Expand Down Expand Up @@ -208,7 +207,7 @@ function Invoke-Test
$testFilter = "/testCaseFilter:`"$TPT_TestFilter`""
}

if($fx -eq $TPT_TargetFrameworkCore -or $fx -eq $TPT_TargetFrameworkCore20)
if($fx -eq $TPT_TargetFrameworkCore20)
{
$vstestConsoleFileName = "vstest.console.dll"
$targetRunTime = ""
Expand Down
6 changes: 3 additions & 3 deletions scripts/verify-nupkgs.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ function Verify-Nuget-Packages($packageDirectory)
"Microsoft.NET.Test.Sdk" = 13;
"Microsoft.TestPlatform" = 421;
"Microsoft.TestPlatform.Build" = 19;
"Microsoft.TestPlatform.CLI" = 303;
"Microsoft.TestPlatform.CLI" = 300;
"Microsoft.TestPlatform.Extensions.TrxLogger" = 33;
"Microsoft.TestPlatform.ObjectModel" = 65;
"Microsoft.TestPlatform.Portable" = 472;
"Microsoft.TestPlatform.ObjectModel" = 62;
"Microsoft.TestPlatform.Portable" = 469;
"Microsoft.TestPlatform.TestHost" = 140;
"Microsoft.TestPlatform.TranslationLayer" = 121}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@
<ProjectReference Include="..\..\Microsoft.TestPlatform.ObjectModel\Microsoft.TestPlatform.ObjectModel.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="System.Diagnostics.Process">
<Version>4.3.0</Version>
</PackageReference>
<PackageReference Include="Microsoft.Internal.CodeCoverage">
<Version>$(TestPlatformExternalsVersion)</Version>
</PackageReference>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
<Import Project="$(TestPlatformRoot)scripts/build/TestPlatform.Settings.targets" />
<PropertyGroup>
<AssemblyName>Microsoft.VisualStudio.TestPlatform.Client</AssemblyName>
<TargetFrameworks>netstandard1.4;net451</TargetFrameworks>
<TargetFrameworks Condition=" '$(DotNetBuildFromSource)' == 'true' ">netstandard1.4</TargetFrameworks>
<TargetFrameworks>netstandard2.0;net451</TargetFrameworks>
<TargetFrameworks Condition=" '$(DotNetBuildFromSource)' == 'true' ">netstandard2.0</TargetFrameworks>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can this move into the TestPlatform.settings.targets ? Will prevent adding for every project

</PropertyGroup>
<ItemGroup>
<EmbeddedResource Include="Resources\Resources.resx" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
<Import Project="$(TestPlatformRoot)scripts/build/TestPlatform.Settings.targets" />
<PropertyGroup>
<AssemblyName>Microsoft.VisualStudio.TestPlatform.Common</AssemblyName>
<TargetFrameworks>netstandard1.4;net451</TargetFrameworks>
<TargetFrameworks Condition=" '$(DotNetBuildFromSource)' == 'true' ">netstandard1.4</TargetFrameworks>
<TargetFrameworks>netstandard2.0;net451</TargetFrameworks>
<TargetFrameworks Condition=" '$(DotNetBuildFromSource)' == 'true' ">netstandard2.0</TargetFrameworks>
<WarningsAsErrors>true</WarningsAsErrors>
</PropertyGroup>
<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
<Import Project="$(TestPlatformRoot)scripts/build/TestPlatform.Settings.targets" />
<PropertyGroup>
<AssemblyName>Microsoft.TestPlatform.CommunicationUtilities</AssemblyName>
<TargetFrameworks>netstandard1.4;net451</TargetFrameworks>
<TargetFrameworks Condition=" '$(DotNetBuildFromSource)' == 'true' ">netstandard1.4</TargetFrameworks>
<TargetFrameworks>netstandard2.0;net451</TargetFrameworks>
<TargetFrameworks Condition=" '$(DotNetBuildFromSource)' == 'true' ">netstandard2.0</TargetFrameworks>
<WarningsAsErrors>true</WarningsAsErrors>
<EnableCodeAnalysis>true</EnableCodeAnalysis>
</PropertyGroup>
Expand All @@ -22,14 +22,8 @@
<Version>$(JsonNetVersion)</Version>
</PackageReference>
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard1.4' ">
<PackageReference Include="System.Runtime.Serialization.Primitives">
<Version>4.1.1</Version>
</PackageReference>
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net451' ">
<Reference Include="System" />
<Reference Include="Microsoft.CSharp" />
</ItemGroup>
<ItemGroup>
<Compile Update="Resources\Resources.Designer.cs">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
<Import Project="$(TestPlatformRoot)scripts/build/TestPlatform.Settings.targets" />
<PropertyGroup>
<AssemblyName>Microsoft.TestPlatform.CoreUtilities</AssemblyName>
<TargetFrameworks>netstandard1.4;net451</TargetFrameworks>
<TargetFrameworks Condition=" '$(DotNetBuildFromSource)' == 'true' ">netstandard1.4</TargetFrameworks>
<TargetFrameworks>netstandard2.0;net451</TargetFrameworks>
<TargetFrameworks Condition=" '$(DotNetBuildFromSource)' == 'true' ">netstandard2.0</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<EmbeddedResource Include="Resources\Resources.resx" />
Expand All @@ -20,7 +20,7 @@
<Reference Include="System" />
<Reference Include="Microsoft.CSharp" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard1.4' ">
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
<PackageReference Include="System.Diagnostics.FileVersionInfo">
<Version>4.0.0</Version>
</PackageReference>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public static TraceLevel TraceLevel

#endif

#if NETSTANDARD1_4
#if NETSTANDARD2_0
public static PlatformTraceLevel TraceLevel
{
get
Expand Down
Loading