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

Upgrade CC components #2698

Merged
merged 4 commits into from
Jan 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
12 changes: 9 additions & 3 deletions scripts/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -694,6 +694,9 @@ function Create-VsixPackage
Copy-Loc-Files $traceDataCollectorPackageDirectory $extensionsPackageDir "Microsoft.VisualStudio.TraceDataCollector.resources.dll"
}

$codeCoverageInterprocessPackageDirectory = Join-Path $env:TP_PACKAGES_DIR "Microsoft.VisualStudio.Coverage.Interprocess\$codeCoverageExternalsVersion\lib\$TPB_TargetFrameworkNS20"
Copy-Item $codeCoverageInterprocessPackageDirectory\Microsoft.VisualStudio.Coverage.Interprocess.dll $extensionsPackageDir -Force

# Copy legacy dependencies
$legacyDir = Join-Path $env:TP_PACKAGES_DIR "Microsoft.Internal.TestPlatform.Extensions\$testPlatformExternalsVersion\contentFiles\any\any"
Copy-Item -Recurse $legacyDir\* $packageDir -Force
Expand Down Expand Up @@ -817,8 +820,6 @@ function Create-NugetPackages
# Additional external dependency folders
$microsoftFakesVersion = ([xml](Get-Content $env:TP_ROOT_DIR\scripts\build\TestPlatform.Dependencies.props)).Project.PropertyGroup.MicrosoftFakesVersion
$FakesPackageDir = Join-Path $env:TP_PACKAGES_DIR "Microsoft.QualityTools.Testing.Fakes.TestRunnerHarness\$microsoftFakesVersion\contentFiles"
$codeCoverageExternalsVersion = ([xml](Get-Content $env:TP_ROOT_DIR\scripts\build\TestPlatform.Dependencies.props)).Project.PropertyGroup.CodeCoverageExternalsVersion
$TraceDataCollectorPackagesDir = Join-Path $env:TP_PACKAGES_DIR "microsoft.visualstudio.tracedatacollector\$codeCoverageExternalsVersion\lib"

# package them from stagingDir
foreach ($file in $nuspecFiles) {
Expand All @@ -828,7 +829,7 @@ function Create-NugetPackages
}

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`;JsonNetVersion=$JsonNetVersion`;Runtime=$TPB_TargetRuntime`;NetCoreTargetFramework=$TPB_TargetFrameworkCore20`;FakesPackageDir=$FakesPackageDir`;TraceDataCollectorPackagesDir=$TraceDataCollectorPackagesDir`;NetStandard10Framework=$TPB_TargetFrameworkNS10`;NetStandard13Framework=$TPB_TargetFrameworkNS13`;NetStandard20Framework=$TPB_TargetFrameworkNS20`;Uap10Framework=$testhostUapPackageDir $additionalArgs
& $nugetExe pack $stagingDir\$file -OutputDirectory $packageOutputDir -Version $TPB_Version -Properties Version=$TPB_Version`;JsonNetVersion=$JsonNetVersion`;Runtime=$TPB_TargetRuntime`;NetCoreTargetFramework=$TPB_TargetFrameworkCore20`;FakesPackageDir=$FakesPackageDir`;NetStandard10Framework=$TPB_TargetFrameworkNS10`;NetStandard13Framework=$TPB_TargetFrameworkNS13`;NetStandard20Framework=$TPB_TargetFrameworkNS20`;Uap10Framework=$testhostUapPackageDir $additionalArgs

Set-ScriptFailedOnError
}
Expand All @@ -846,20 +847,25 @@ function Copy-CodeCoverage-Package-Artifacts
$codeCoverageExternalsVersion = ([xml](Get-Content $env:TP_ROOT_DIR\scripts\build\TestPlatform.Dependencies.props)).Project.PropertyGroup.CodeCoverageExternalsVersion
$traceDataCollectorPackagesDir = Join-Path $env:TP_PACKAGES_DIR "microsoft.visualstudio.tracedatacollector\$codeCoverageExternalsVersion\lib\$TPB_TargetFrameworkNS20"
$internalCodeCoveragePackagesDir = Join-Path $env:TP_PACKAGES_DIR "microsoft.internal.codecoverage\$codeCoverageExternalsVersion\contentFiles\any\any\"
$codeCoverageCoreLibPackagesDir = Join-Path $env:TP_PACKAGES_DIR "microsoft.visualstudio.coverage.corelib.net\$codeCoverageExternalsVersion\lib\$TPB_TargetFrameworkNS20"
$codeCoverageInterprocessPackagesDir = Join-Path $env:TP_PACKAGES_DIR "microsoft.visualstudio.coverage.interprocess\$codeCoverageExternalsVersion\lib\$TPB_TargetFrameworkNS20"

$microsoftCodeCoveragePackageDir = $(Join-Path $env:TP_OUT_DIR "$TPB_Configuration\Microsoft.CodeCoverage\")

New-Item -ItemType directory -Path $microsoftCodeCoveragePackageDir -Force | Out-Null

Copy-Item $traceDataCollectorPackagesDir\Microsoft.VisualStudio.TraceDataCollector.dll $microsoftCodeCoveragePackageDir -Force
Copy-Item $traceDataCollectorPackagesDir\Microsoft.VisualStudio.TraceDataCollector.pdb $microsoftCodeCoveragePackageDir -Force
Copy-Item $codeCoverageCoreLibPackagesDir\Microsoft.VisualStudio.Coverage.CoreLib.Net.dll $microsoftCodeCoveragePackageDir -Force
Copy-Item $codeCoverageInterprocessPackagesDir\Microsoft.VisualStudio.Coverage.Interprocess.dll $microsoftCodeCoveragePackageDir -Force
Copy-Item $internalCodeCoveragePackagesDir\CodeCoverage $microsoftCodeCoveragePackageDir -Force -Recurse
Copy-Item $internalCodeCoveragePackagesDir\InstrumentationEngine $microsoftCodeCoveragePackageDir -Force -Recurse
Copy-Item $internalCodeCoveragePackagesDir\Shim $microsoftCodeCoveragePackageDir -Force -Recurse

# Copy TraceDataCollector resource dlls
if($TPB_LocalizedBuild) {
Copy-Loc-Files $traceDataCollectorPackagesDir $microsoftCodeCoveragePackageDir "Microsoft.VisualStudio.TraceDataCollector.resources.dll"
Copy-Loc-Files $codeCoverageCoreLibPackagesDir $microsoftCodeCoveragePackageDir "Microsoft.VisualStudio.Coverage.CoreLib.Net.resources.dll"
}
}

Expand Down
2 changes: 1 addition & 1 deletion scripts/build/TestPlatform.Dependencies.props
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<JsonNetVersion>9.0.1</JsonNetVersion>
<MoqVersion>4.7.63</MoqVersion>
<TestPlatformExternalsVersion>16.9.0-preview-4267359</TestPlatformExternalsVersion>
<CodeCoverageExternalsVersion>16.9.0-beta.20630.1</CodeCoverageExternalsVersion>
<CodeCoverageExternalsVersion>16.9.0-beta.21064.1</CodeCoverageExternalsVersion>
<MicrosoftFakesVersion>16.9.0-beta.20628.1</MicrosoftFakesVersion>

<MicrosoftBuildPackageVersion>16.0.461</MicrosoftBuildPackageVersion>
Expand Down
4 changes: 2 additions & 2 deletions scripts/verify-nupkgs.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ function Verify-Nuget-Packages($packageDirectory, $version)
{
Write-Log "Starting Verify-Nuget-Packages."
$expectedNumOfFiles = @{
"Microsoft.CodeCoverage" = 44;
"Microsoft.CodeCoverage" = 59;
"Microsoft.NET.Test.Sdk" = 18;
"Microsoft.TestPlatform" = 499;
"Microsoft.TestPlatform" = 513;
"Microsoft.TestPlatform.Build" = 19;
"Microsoft.TestPlatform.CLI" = 379;
"Microsoft.TestPlatform.Extensions.TrxLogger" = 33;
Expand Down
4 changes: 0 additions & 4 deletions scripts/vsts-prebuild.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,3 @@ Write-Host "##vso[task.setvariable variable=JsonNetVersion;]$JsonNetVersion"
$microsoftFakesVersion = ([xml](Get-Content $TP_ROOT_DIR\scripts\build\TestPlatform.Dependencies.props)).Project.PropertyGroup.MicrosoftFakesVersion
$FakesPackageDir = Join-Path $TP_ROOT_DIR "packages\Microsoft.QualityTools.Testing.Fakes.TestRunnerHarness\$microsoftFakesVersion\contentFiles"
Write-Host "##vso[task.setvariable variable=FakesPackageDir;]$FakesPackageDir"

$codeCoverageExternalsVersion = ([xml](Get-Content $TP_ROOT_DIR\scripts\build\TestPlatform.Dependencies.props)).Project.PropertyGroup.CodeCoverageExternalsVersion
$TraceDataCollectorPackagesDir = Join-Path $TP_ROOT_DIR "packages\microsoft.visualstudio.tracedatacollector\$codeCoverageExternalsVersion\lib"
Write-Host "##vso[task.setvariable variable=TraceDataCollectorPackagesDir;]$TraceDataCollectorPackagesDir"
4 changes: 4 additions & 0 deletions src/package/external/external.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@
<Version>$(CodeCoverageExternalsVersion)</Version>
<PrivateAssets>All</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.VisualStudio.Coverage.Interprocess">
<Version>$(CodeCoverageExternalsVersion)</Version>
<PrivateAssets>All</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.VisualStudio.QualityTools">
<Version>$(TestPlatformExternalsVersion)</Version>
<PrivateAssets>All</PrivateAssets>
Expand Down
46 changes: 31 additions & 15 deletions src/package/nuspec/Microsoft.CodeCoverage.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@

<file src="Microsoft.CodeCoverage.props" target="build\netstandard1.0\" />
<file src="Microsoft.CodeCoverage.targets" target="build\netstandard1.0\" />
<file src="$TraceDataCollectorPackagesDir$\netstandard2.0\Microsoft.VisualStudio.TraceDataCollector.dll" target="build\netstandard1.0\" />
<file src="Microsoft.CodeCoverage\Microsoft.VisualStudio.TraceDataCollector.dll" target="build\netstandard1.0\" />
<file src="Microsoft.CodeCoverage\Microsoft.VisualStudio.Coverage.CoreLib.Net.dll" target="build\netstandard1.0\" />
<file src="Microsoft.CodeCoverage\Microsoft.VisualStudio.Coverage.Interprocess.dll" target="build\netstandard1.0\" />

<file src="Microsoft.CodeCoverage\CodeCoverage\CodeCoverage.config" target="build\netstandard1.0\CodeCoverage\" />
<file src="Microsoft.CodeCoverage\CodeCoverage\CodeCoverage.exe" target="build\netstandard1.0\CodeCoverage\" />
Expand Down Expand Up @@ -50,20 +52,34 @@
<file src="Microsoft.CodeCoverage\Shim\netcoreapp1.0\Microsoft.VisualStudio.CodeCoverage.Shim.dll" target="lib\netcoreapp1.0\" />
<file src="Microsoft.CodeCoverage\Shim\net45\Microsoft.VisualStudio.CodeCoverage.Shim.dll" target="lib\net45\" />

<!-- Add localized resources -->
<file src="$TraceDataCollectorPackagesDir$\netstandard2.0\cs\Microsoft.VisualStudio.TraceDataCollector.resources.dll" target="build\netstandard1.0\cs" />
<file src="$TraceDataCollectorPackagesDir$\netstandard2.0\de\Microsoft.VisualStudio.TraceDataCollector.resources.dll" target="build\netstandard1.0\de" />
<file src="$TraceDataCollectorPackagesDir$\netstandard2.0\es\Microsoft.VisualStudio.TraceDataCollector.resources.dll" target="build\netstandard1.0\es" />
<file src="$TraceDataCollectorPackagesDir$\netstandard2.0\fr\Microsoft.VisualStudio.TraceDataCollector.resources.dll" target="build\netstandard1.0\fr" />
<file src="$TraceDataCollectorPackagesDir$\netstandard2.0\it\Microsoft.VisualStudio.TraceDataCollector.resources.dll" target="build\netstandard1.0\it" />
<file src="$TraceDataCollectorPackagesDir$\netstandard2.0\ja\Microsoft.VisualStudio.TraceDataCollector.resources.dll" target="build\netstandard1.0\ja" />
<file src="$TraceDataCollectorPackagesDir$\netstandard2.0\ko\Microsoft.VisualStudio.TraceDataCollector.resources.dll" target="build\netstandard1.0\ko" />
<file src="$TraceDataCollectorPackagesDir$\netstandard2.0\pl\Microsoft.VisualStudio.TraceDataCollector.resources.dll" target="build\netstandard1.0\pl" />
<file src="$TraceDataCollectorPackagesDir$\netstandard2.0\pt-BR\Microsoft.VisualStudio.TraceDataCollector.resources.dll" target="build\netstandard1.0\pt-BR" />
<file src="$TraceDataCollectorPackagesDir$\netstandard2.0\ru\Microsoft.VisualStudio.TraceDataCollector.resources.dll" target="build\netstandard1.0\ru" />
<file src="$TraceDataCollectorPackagesDir$\netstandard2.0\tr\Microsoft.VisualStudio.TraceDataCollector.resources.dll" target="build\netstandard1.0\tr" />
<file src="$TraceDataCollectorPackagesDir$\netstandard2.0\zh-Hans\Microsoft.VisualStudio.TraceDataCollector.resources.dll" target="build\netstandard1.0\zh-Hans" />
<file src="$TraceDataCollectorPackagesDir$\netstandard2.0\zh-Hant\Microsoft.VisualStudio.TraceDataCollector.resources.dll" target="build\netstandard1.0\zh-Hant" />
<!-- Add localized resources for trace data collector -->
<file src="Microsoft.CodeCoverage\cs\Microsoft.VisualStudio.TraceDataCollector.resources.dll" target="build\netstandard1.0\cs" />
<file src="Microsoft.CodeCoverage\de\Microsoft.VisualStudio.TraceDataCollector.resources.dll" target="build\netstandard1.0\de" />
<file src="Microsoft.CodeCoverage\es\Microsoft.VisualStudio.TraceDataCollector.resources.dll" target="build\netstandard1.0\es" />
<file src="Microsoft.CodeCoverage\fr\Microsoft.VisualStudio.TraceDataCollector.resources.dll" target="build\netstandard1.0\fr" />
<file src="Microsoft.CodeCoverage\it\Microsoft.VisualStudio.TraceDataCollector.resources.dll" target="build\netstandard1.0\it" />
<file src="Microsoft.CodeCoverage\ja\Microsoft.VisualStudio.TraceDataCollector.resources.dll" target="build\netstandard1.0\ja" />
<file src="Microsoft.CodeCoverage\ko\Microsoft.VisualStudio.TraceDataCollector.resources.dll" target="build\netstandard1.0\ko" />
<file src="Microsoft.CodeCoverage\pl\Microsoft.VisualStudio.TraceDataCollector.resources.dll" target="build\netstandard1.0\pl" />
<file src="Microsoft.CodeCoverage\pt-BR\Microsoft.VisualStudio.TraceDataCollector.resources.dll" target="build\netstandard1.0\pt-BR" />
<file src="Microsoft.CodeCoverage\ru\Microsoft.VisualStudio.TraceDataCollector.resources.dll" target="build\netstandard1.0\ru" />
<file src="Microsoft.CodeCoverage\tr\Microsoft.VisualStudio.TraceDataCollector.resources.dll" target="build\netstandard1.0\tr" />
<file src="Microsoft.CodeCoverage\zh-Hans\Microsoft.VisualStudio.TraceDataCollector.resources.dll" target="build\netstandard1.0\zh-Hans" />
<file src="Microsoft.CodeCoverage\zh-Hant\Microsoft.VisualStudio.TraceDataCollector.resources.dll" target="build\netstandard1.0\zh-Hant" />

<!-- Add localized resources for code coverage corelib -->
<file src="Microsoft.CodeCoverage\cs\Microsoft.VisualStudio.Coverage.CoreLib.Net.resources.dll" target="build\netstandard1.0\cs" />
<file src="Microsoft.CodeCoverage\de\Microsoft.VisualStudio.Coverage.CoreLib.Net.resources.dll" target="build\netstandard1.0\de" />
<file src="Microsoft.CodeCoverage\es\Microsoft.VisualStudio.Coverage.CoreLib.Net.resources.dll" target="build\netstandard1.0\es" />
<file src="Microsoft.CodeCoverage\fr\Microsoft.VisualStudio.Coverage.CoreLib.Net.resources.dll" target="build\netstandard1.0\fr" />
<file src="Microsoft.CodeCoverage\it\Microsoft.VisualStudio.Coverage.CoreLib.Net.resources.dll" target="build\netstandard1.0\it" />
<file src="Microsoft.CodeCoverage\ja\Microsoft.VisualStudio.Coverage.CoreLib.Net.resources.dll" target="build\netstandard1.0\ja" />
<file src="Microsoft.CodeCoverage\ko\Microsoft.VisualStudio.Coverage.CoreLib.Net.resources.dll" target="build\netstandard1.0\ko" />
<file src="Microsoft.CodeCoverage\pl\Microsoft.VisualStudio.Coverage.CoreLib.Net.resources.dll" target="build\netstandard1.0\pl" />
<file src="Microsoft.CodeCoverage\pt-BR\Microsoft.VisualStudio.Coverage.CoreLib.Net.resources.dll" target="build\netstandard1.0\pt-BR" />
<file src="Microsoft.CodeCoverage\ru\Microsoft.VisualStudio.Coverage.CoreLib.Net.resources.dll" target="build\netstandard1.0\ru" />
<file src="Microsoft.CodeCoverage\tr\Microsoft.VisualStudio.Coverage.CoreLib.Net.resources.dll" target="build\netstandard1.0\tr" />
<file src="Microsoft.CodeCoverage\zh-Hans\Microsoft.VisualStudio.Coverage.CoreLib.Net.resources.dll" target="build\netstandard1.0\zh-Hans" />
<file src="Microsoft.CodeCoverage\zh-Hant\Microsoft.VisualStudio.Coverage.CoreLib.Net.resources.dll" target="build\netstandard1.0\zh-Hant" />
</files>
</package>
Loading