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

Netcoreapp2.0move #603

Merged
merged 25 commits into from
Mar 16, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
0f5feae
build vstest.console.dll as netcoreapp2.0
sbaid Mar 11, 2017
2d23bf0
test script changes
sbaid Mar 12, 2017
346c402
Fixing acceptance tests - core runner frameowork as netcoreapp2.0
sbaid Mar 12, 2017
99ff83f
stream test run to console
smadala Mar 13, 2017
d8f4204
Move TestPlatform.CLI artifacts to netcoreapp2.0 folder
smadala Mar 13, 2017
2583177
Ignore failing platform tests
smadala Mar 13, 2017
392e054
Merge branch 'master' into netcoreapp2.0move
smadala Mar 14, 2017
2478526
Merge branch 'master' into netcoreapp2.0move
smadala Mar 15, 2017
092e2ae
Merge branch 'master' of https://github.com/Microsoft/vstest into net…
smadala Mar 15, 2017
2640910
Install netcoreapp1.1 shared runtime.
Mar 15, 2017
fd41482
Match System.Xml.XPath.XmlDocument and DependencyModel version with d…
smadala Mar 15, 2017
803f2c9
Merge branch 'netcoreapp2.0move' of https://github.com/Microsoft/vste…
smadala Mar 15, 2017
f7e7610
Install netcoreapp 1.1.1 shared runtime for acceptance tests targetin…
Mar 16, 2017
99f377e
Merge branch 'master' into netcoreapp2.0move
codito Mar 16, 2017
96aafb1
Revert nuspec2 files
smadala Mar 16, 2017
3d1b6c2
Merge branch 'netcoreapp2.0move' of https://github.com/Microsoft/vste…
smadala Mar 16, 2017
321489f
uncomment build steps
smadala Mar 16, 2017
707056d
Move DataCollectors to netcoreapp2.0. Use the datacollector for the r…
Mar 16, 2017
b9d691f
Enable vstest.console and translation layer unit tests.
Mar 16, 2017
09e4af0
Merge branch 'master' into netcoreapp2.0move
codito Mar 16, 2017
07e5d32
Add target fx as a parameter to run specific tests in test.ps1.
Mar 16, 2017
2faaadc
Make error null to handle JSON serialize exception
smadala Mar 16, 2017
b267246
Merge branch 'netcoreapp2.0move' of https://github.com/Microsoft/vste…
smadala Mar 16, 2017
fca1a68
Use netcoreapp2.0 as the base directory for core clr package.
Mar 16, 2017
b3fcaca
Skip target framework only if not null.
codito Mar 16, 2017
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
5 changes: 0 additions & 5 deletions samples/UnitTestProject/UnitTestProject.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,6 @@
<Version>15.0.0-preview-20170106-08</Version>
</PackageReference>
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp1.0' ">
<PackageReference Include="Microsoft.NETCore.App">
<Version>1.0.0</Version>
</PackageReference>
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net46' ">
<Reference Include="System.Runtime" />
<Reference Include="System" />
Expand Down
34 changes: 21 additions & 13 deletions scripts/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ Write-Verbose "Setup build configuration."
$TPB_Solution = "TestPlatform.sln"
$TPB_TargetFramework = "net46"
$TPB_TargetFrameworkCore = "netcoreapp1.0"
$TPB_TargetFrameworkCore20 = "netcoreapp2.0"
$TPB_Configuration = $Configuration
$TPB_TargetRuntime = $TargetRuntime
# Version suffix is empty for RTM releases
Expand Down Expand Up @@ -108,7 +109,7 @@ function Install-DotNetCli
{
$timer = Start-Timer
Write-Log "Install-DotNetCli: Get dotnet-install.ps1 script..."
$dotnetInstallRemoteScript = "https://raw.githubusercontent.com/dotnet/cli/rel/1.0.0/scripts/obtain/dotnet-install.ps1"
$dotnetInstallRemoteScript = "https://raw.githubusercontent.com/dotnet/cli/master/scripts/obtain/dotnet-install.ps1"
$dotnetInstallScript = Join-Path $env:TP_TOOLS_DIR "dotnet-install.ps1"
if (-not (Test-Path $env:TP_TOOLS_DIR)) {
New-Item $env:TP_TOOLS_DIR -Type Directory | Out-Null
Expand All @@ -131,11 +132,11 @@ function Install-DotNetCli
Write-Log "Install-DotNetCli: Get the latest dotnet cli toolset..."
$dotnetInstallPath = Join-Path $env:TP_TOOLS_DIR "dotnet"
New-Item -ItemType directory -Path $dotnetInstallPath -Force | Out-Null
& $dotnetInstallScript -InstallDir $dotnetInstallPath -NoPath -Version $env:DOTNET_CLI_VERSION
& $dotnetInstallScript -Channel "master" -InstallDir $dotnetInstallPath -NoPath -Version $env:DOTNET_CLI_VERSION

# Uncomment to pull in additional shared frameworks.
# This is added to get netcoreapp1.1 shared components.
#& $dotnetInstallScript -InstallDir $dotnetInstallPath -SharedRuntime -Version '1.1.0' -Channel 'release/1.1.0'
& $dotnetInstallScript -InstallDir $dotnetInstallPath -SharedRuntime -Version '1.1.1' -Channel 'release/1.1.0'

Write-Log "Install-DotNetCli: Complete. {$(Get-ElapsedTime($timer))}"
}
Expand Down Expand Up @@ -184,6 +185,7 @@ function Publish-Package
$dotnetExe = Get-DotNetPath
$fullCLRPackageDir = Get-FullCLRPackageDirectory
$coreCLRPackageDir = Get-CoreCLRPackageDirectory
$coreCLR20PackageDir = Get-CoreCLR20PackageDirectory
$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"
Expand All @@ -196,17 +198,17 @@ function Publish-Package


Publish-PackageInternal $packageProject $TPB_TargetFramework $fullCLRPackageDir
Publish-PackageInternal $packageProject $TPB_TargetFrameworkCore $coreCLRPackageDir
Publish-PackageInternal $packageProject $TPB_TargetFrameworkCore20 $coreCLR20PackageDir

# Publish vstest.console and datacollector exclusively because *.config/*.deps.json file is not getting publish when we are publishing aforementioned project through dependency.

Write-Log "Package: Publish src\vstest.console\vstest.console.csproj"
Publish-PackageInternal $vstestConsoleProject $TPB_TargetFramework $fullCLRPackageDir
Publish-PackageInternal $vstestConsoleProject $TPB_TargetFrameworkCore $coreCLRPackageDir
Publish-PackageInternal $vstestConsoleProject $TPB_TargetFrameworkCore20 $coreCLR20PackageDir

Write-Log "Package: Publish src\datacollector\datacollector.csproj"
Publish-PackageInternal $dataCollectorProject $TPB_TargetFramework $fullCLRPackageDir
Publish-PackageInternal $dataCollectorProject $TPB_TargetFrameworkCore $coreCLRPackageDir
Publish-PackageInternal $dataCollectorProject $TPB_TargetFrameworkCore20 $coreCLR20PackageDir

# Publish testhost

Expand All @@ -222,7 +224,7 @@ function Publish-Package

# Copy over the Full CLR built testhost package assemblies to the Core CLR package folder.
$netFull_Dir = "TestHost"
$fullDestDir = Join-Path $coreCLRPackageDir $netFull_Dir
$fullDestDir = Join-Path $coreCLR20PackageDir $netFull_Dir
New-Item -ItemType directory -Path $fullDestDir -Force | Out-Null
Copy-Item $testhostFullPackageDir\* $fullDestDir -Force

Expand All @@ -235,12 +237,12 @@ function Publish-Package
$platformAbstractionNet46 = Join-Path $platformAbstraction $TPB_TargetFramework
$platformAbstractionNetCore = Join-Path $platformAbstraction $TPB_TargetFrameworkCore
Copy-Item $platformAbstractionNet46\* $fullCLRPackageDir -Force
Copy-Item $platformAbstractionNetCore\* $coreCLRPackageDir -Force
Copy-Item $platformAbstractionNetCore\* $coreCLR20PackageDir -Force

# Copy over the logger assemblies to the Extensions folder.
$extensions_Dir = "Extensions"
$fullCLRExtensionsDir = Join-Path $fullCLRPackageDir $extensions_Dir
$coreCLRExtensionsDir = Join-Path $coreCLRPackageDir $extensions_Dir
$coreCLRExtensionsDir = Join-Path $coreCLR20PackageDir $extensions_Dir
# Create an extensions directory.
New-Item -ItemType directory -Path $fullCLRExtensionsDir -Force | Out-Null
New-Item -ItemType directory -Path $coreCLRExtensionsDir -Force | Out-Null
Expand All @@ -252,8 +254,8 @@ function Publish-Package
Write-Verbose "Move-Item $fullCLRPackageDir\$file $fullCLRExtensionsDir -Force"
Move-Item $fullCLRPackageDir\$file $fullCLRExtensionsDir -Force

Write-Verbose "Move-Item $coreCLRPackageDir\$file $coreCLRExtensionsDir -Force"
Move-Item $coreCLRPackageDir\$file $coreCLRExtensionsDir -Force
Write-Verbose "Move-Item $coreCLR20PackageDir\$file $coreCLRExtensionsDir -Force"
Move-Item $coreCLR20PackageDir\$file $coreCLRExtensionsDir -Force
}

# For libraries that are externally published, copy the output into artifacts. These will be signed and packaged independently.
Expand Down Expand Up @@ -334,14 +336,15 @@ function Create-NugetPackages
# 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"

# package them from stagingDir
foreach ($file in $nuspecFiles) {
$additionalArgs = ""
if ($skipAnalysis -contains $file) {
$additionalArgs = "-NoPackageAnalysis"
}

Write-Verbose "$nugetExe pack $stagingDir\$file -OutputDirectory $packageOutputDir -Version $TPB_Version -Properties Version=$TPB_Version $additionalArgs"
& $nugetExe pack $stagingDir\$file -OutputDirectory $packageOutputDir -Version $TPB_Version -Properties Version=$TPB_Version`;Runtime=$TPB_TargetRuntime $additionalArgs
& $nugetExe pack $stagingDir\$file -OutputDirectory $packageOutputDir -Version $TPB_Version -Properties Version=$TPB_Version`;Runtime=$TPB_TargetRuntime`;NetCoreTargetFramework=$TPB_TargetFrameworkCore20 $additionalArgs
}

Write-Log "Create-NugetPackages: Complete. {$(Get-ElapsedTime($timer))}"
Expand Down Expand Up @@ -408,6 +411,11 @@ 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")
}

function Start-Timer
{
return [System.Diagnostics.Stopwatch]::StartNew()
Expand Down Expand Up @@ -511,7 +519,7 @@ function Build-SpecificProjects
{
Write-Log "Build-SpecificProjects: Started for pattern: $ProjectNamePatterns"
# FrameworksAndOutDirs format ("<target_framework>", "<output_dir>").
$FrameworksAndOutDirs =( ("net46", "net46\win7-x64"), ("netstandard1.5", "netcoreapp1.0"), ("netcoreapp1.0", "netcoreapp1.0"))
$FrameworksAndOutDirs =( ("net46", "net46\win7-x64"), ("netstandard1.5", "netcoreapp2.0"), ("netcoreapp1.0", "netcoreapp2.0"), ("netcoreapp2.0", "netcoreapp2.0"))
$dotnetPath = Get-DotNetPath

# Get projects to build.
Expand Down
5 changes: 5 additions & 0 deletions scripts/build/TestPlatform.targets
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,10 @@
<TestPlatformRoot Condition="$(TestPlatformRoot) == ''">$(MSBuildThisFileDirectory)..\..\</TestPlatformRoot>
</PropertyGroup>

<!-- TODO Remove when implicit references are available for netcoreapp2.0 -->
<PropertyGroup Condition="'$(TargetFramework)' == 'netcoreapp2.0'">
<RuntimeFrameworkVersion>2.0.0-beta-001737-00</RuntimeFrameworkVersion>
</PropertyGroup>

<Import Project="$(MSBuildThisFileDirectory)TestPlatform.Localization.targets" />
</Project>
61 changes: 33 additions & 28 deletions scripts/test.ps1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Copyright (c) Microsoft. All rights reserved.
# Build script for Test Platform.
# Test script for Test Platform.

[CmdletBinding()]
Param(
Expand All @@ -13,6 +13,11 @@ Param(
[Alias("r")]
[System.String] $TargetRuntime = "win7-x64",

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

# Only test sources matching the pattern are run.
# Use End2End to run E2E tests. Or to run any one assembly tests, use the
# assembly name. E.g. test -p Microsoft.TestPlatform.CoreUtilities.UnitTests
Expand Down Expand Up @@ -66,10 +71,12 @@ $env:NUGET_PACKAGES = $env:TP_PACKAGES_DIR
#
$TPT_TargetFrameworkFullCLR = "net46"
$TPT_TargetFrameworkCore = "netcoreapp1.0"
$TPT_TargetFramework20Core = "netcoreapp2.0"
Write-Verbose "Setup build configuration."
$Script:TPT_Configuration = $Configuration
$Script:TPT_SourceFolders = @("test")
$Script:TPT_TargetFrameworks =@($TPT_TargetFrameworkCore, $TPT_TargetFrameworkFullCLR)
$Script:TPT_TargetFramework = $TargetFramework
$Script:TPT_TargetRuntime = $TargetRuntime
$Script:TPT_SkipProjects = @("Microsoft.TestPlatform.Build.UnitTests.csproj")
$Script:TPT_Pattern = $Pattern
Expand Down Expand Up @@ -109,12 +116,13 @@ function Print-FailedTests($TrxFilePath)
$xdoc = [xml] (get-content $TrxFilePath)
$FailedTestCaseDetailsDict = @{}
# Get failed testcase data from UnitTestResult tag.
$xdoc.TestRun.Results.UnitTestResult |?{$_.GetAttribute("outcome") -eq "Failed"} | %{
$xdoc.TestRun.Results.UnitTestResult | ? { $_.GetAttribute("outcome") -eq "Failed" } | % {
$FailedTestCaseDetailsDict.Add($_.testId, @{"Message" = $_.Output.ErrorInfo.Message; "StackTrace" = $_.Output.ErrorInfo.StackTrace; "StdOut"=$_.Output.StdOut});
}

if ($FailedTestCaseDetailsDict)
if ($FailedTestCaseDetailsDict.Count -ne 0)
{
Write-Log ".. . Failed tests:" $Script:TPT_ErrorMsgColor
# Print failed test details.
$count = 1
$nl = [Environment]::NewLine
Expand All @@ -125,6 +133,12 @@ function Print-FailedTests($TrxFilePath)
Write-Log (".. .. .. .StdOut: $nl" + $FailedTestCaseDetailsDict[$_.id]["StdOut"]) $Script:TPT_ErrorMsgColor
$count++
}

Set-ScriptFailed
if ($Script:TPT_FailFast) {
Write-Log ".. Stop execution since fail fast is enabled."
continue
}
}
}

Expand All @@ -142,7 +156,7 @@ function Invoke-Test
$testOutputPath = Join-Path $_.Directory.FullName "bin/$($Script:TPT_Configuration)/{0}"
$testContainerPath = Join-Path $testOutputPath "$($testContainerName).dll"

$skip="False"
$skip = "False"

foreach ($project in $Script:TPT_SkipProjects) {
if($_.Name.Contains($project))
Expand All @@ -161,10 +175,13 @@ function Invoke-Test
}
}

# Invoke test for each project.json since we want a custom output
# path.
# Invoke test for each project since we want a custom output path
foreach ($fx in $Script:TPT_TargetFrameworks) {
Write-Log ".. Start run ($fx)"
if ($Script:TPT_TargetFramework -ne "" -and $fx -ne $Script:TPT_TargetFramework) {
Write-Log ".. . Skipped framework based on user setting."
continue;
}

# Tests are only built for x86 at the moment, though we don't have architecture requirement
$testAdapterPath = Get-TestAdapterPath
Expand All @@ -175,14 +192,15 @@ function Invoke-Test
$testFrameWork = ".NETCoreApp,Version=v1.0"
$vstestConsoleFileName = "vstest.console.dll"
$targetRunTime = ""
} else{
$vstestConsolePath = Join-Path (Get-PackageDirectory $TPT_TargetFramework20Core $targetRuntime) $vstestConsoleFileName
} else {

$testFrameWork = ".NETFramework,Version=v4.6"
$vstestConsoleFileName = "vstest.console.exe"
$targetRunTime = $Script:TPT_TargetRuntime
$vstestConsolePath = Join-Path (Get-PackageDirectory $TPT_TargetFrameworkFullCLR $targetRuntime) $vstestConsoleFileName
}

$vstestConsolePath = Join-Path (Get-PackageDirectory $fx $targetRuntime) $vstestConsoleFileName
if (!(Test-Path $vstestConsolePath)) {
Write-Log "Unable to find $vstestConsoleFileName at $vstestConsolePath. Did you run build.cmd?"
Write-Error "Test aborted."
Expand Down Expand Up @@ -231,7 +249,7 @@ function Invoke-Test
# Fill in the framework in test containers
$testContainer = [System.String]::Format($_, $fx)
$trxLogFileName = [System.String]::Format("{0}_{1}_{2}", ($(Get-ChildItem $testContainer).Name), $fx, $Script:TPT_DefaultTrxFileName)

# Remove already existed trx file name as due to which warning will get generated and since we are expecting result in a particular format, that will break
$fullTrxFilePath = Join-Path $Script:TPT_TestResultsDir $trxLogFileName
if([System.IO.File]::Exists($fullTrxFilePath)) {
Expand All @@ -241,32 +259,19 @@ function Invoke-Test
Write-Log ".. Container: $testContainer"

Set-TestEnvironment

if($fx -eq $TPT_TargetFrameworkFullCLR) {

Write-Verbose "$vstestConsolePath $testContainer /platform:$testArchitecture /framework:$testFrameWork /testAdapterPath:$testAdapterPath /logger:`"trx;LogFileName=$trxLogFileName`""
$output = & $vstestConsolePath $testContainer /platform:$testArchitecture /framework:$testFrameWork /testAdapterPath:"$testAdapterPath" /logger:"trx;LogFileName=$trxLogFileName"
& $vstestConsolePath $testContainer /platform:$testArchitecture /framework:$testFrameWork /testAdapterPath:"$testAdapterPath" /logger:"trx;LogFileName=$trxLogFileName"
} else {

Write-Verbose "$dotNetPath $vstestConsolePath $testContainer /platform:$testArchitecture /framework:$testFrameWork /testAdapterPath:$testAdapterPath /logger:`"trx;LogFileName=$trxLogFileName`""
$output = & $dotNetPath $vstestConsolePath $testContainer /platform:$testArchitecture /framework:$testFrameWork /testAdapterPath:"$testAdapterPath" /logger:"trx;LogFileName=$trxLogFileName"
& $dotNetPath $vstestConsolePath $testContainer /platform:$testArchitecture /framework:$testFrameWork /testAdapterPath:"$testAdapterPath" /logger:"trx;LogFileName=$trxLogFileName"
}

Reset-TestEnvironment
if ($output[-3].Contains("Test Run Successful.")) {
Write-Log ".. . $($output[-4])"
} else {
Write-Log ".. . $($output[-3])"
Write-Log ".. . Failed tests:" $Script:TPT_ErrorMsgColor
Print-FailedTests (Join-Path $Script:TPT_TestResultsDir $trxLogFileName)

Set-ScriptFailed

if ($Script:TPT_FailFast) {
Write-Log ".. Stop execution since fail fast is enabled."
continue
}
}
Print-FailedTests (Join-Path $Script:TPT_TestResultsDir $trxLogFileName)
}
}

Expand Down Expand Up @@ -322,7 +327,7 @@ function Reset-TestEnvironment

# Execute build
$timer = Start-Timer
Write-Log "Build started: args = '$args'"
Write-Log "Test started: args = '$args'"
Write-Log "Test platform environment variables: "
Get-ChildItem env: | Where-Object -FilterScript { $_.Name.StartsWith("TP_") } | Format-Table

Expand All @@ -331,6 +336,6 @@ Get-Variable | Where-Object -FilterScript { $_.Name.StartsWith("TPT_") } | Forma

Invoke-Test

Write-Log "Build complete. {$(Get-ElapsedTime($timer))}"
Write-Log "Test complete. {$(Get-ElapsedTime($timer))}"

if ($Script:ScriptFailed) { Exit 1 } else { Exit 0 }
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ private void OnTestRunAbort(ITestRunEventsHandler testRunEventsHandler, Exceptio
var rawMessage = this.dataSerializer.SerializePayload(MessageType.TestMessage, testMessagePayload);
testRunEventsHandler.HandleRawMessage(rawMessage);

// notify test run abort to vstest console wrapper
// notify test run abort to vstest console wrapper.
var completeArgs = new TestRunCompleteEventArgs(null, false, true, exception, null, TimeSpan.Zero);
var payload = new TestRunCompletePayload { TestRunCompleteArgs = completeArgs };
rawMessage = this.dataSerializer.SerializePayload(MessageType.ExecutionComplete, payload);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,11 @@ public class DotnetTestHostManager : ITestRuntimeProvider
}

this.testHostProcessStdError.Append(data);
this.messageLogger.SendMessage(TestMessageLevel.Warning, this.testHostProcessStdError.ToString());
var message = this.testHostProcessStdError.ToString();
if (!string.IsNullOrWhiteSpace(message))
{
this.messageLogger.SendMessage(TestMessageLevel.Warning, message);
}
}

if (process.HasExited && process.ExitCode != 0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.DependencyModel">
<Version>1.1.0</Version>
<Version>1.0.3</Version>
</PackageReference>
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard1.5' ">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public TestRunCompleteEventArgs(ITestRunStatistics stats, bool isCanceled, bool
this.TestRunStatistics = stats;
this.IsCanceled = isCanceled;
this.IsAborted = isAborted;
this.Error = error;
this.Error = null; // Passing error value as null, should be pass exception. Issue: https://github.com/Microsoft/vstest/issues/618
this.AttachmentSets = attachmentSets;
this.ElapsedTimeInRunningTests = elapsedTime;
}
Expand Down
Binary file not shown.
Binary file not shown.
7 changes: 3 additions & 4 deletions src/datacollector/datacollector.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,12 @@
</PropertyGroup>
<PropertyGroup>
<AssemblyName>datacollector</AssemblyName>
<TargetFrameworks>netcoreapp1.0;net46</TargetFrameworks>
<TargetFrameworks>netcoreapp1.0;netcoreapp2.0;net46</TargetFrameworks>
<WarningsAsErrors>true</WarningsAsErrors>
<PlatformTarget Condition="'$(TargetFramework)' == 'net46'">AnyCPU</PlatformTarget>
<OutputType>Exe</OutputType>
<PackageTargetFallback Condition=" '$(TargetFramework)' == 'netcoreapp1.0' ">$(PackageTargetFallback);dnxcore50;netstandardapp1.0;portable-net45+win8;portable-net45+wp80+win8+wpa81+dnxcore50</PackageTargetFallback>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFramework)' != 'netcoreapp1.0'">
<PropertyGroup Condition="'$(TargetFramework)' == 'net46'">
<RuntimeIdentifier>win7-x64</RuntimeIdentifier>
</PropertyGroup>
<ItemGroup>
Expand All @@ -29,7 +28,7 @@
<FromP2P>true</FromP2P>
</ProjectReference>
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp1.0' ">
<ItemGroup Condition=" '$(TargetFramework)' != 'net46' ">
<PackageReference Include="System.Runtime.Loader">
<Version>4.3.0</Version>
</PackageReference>
Expand Down
Loading