Last active
August 11, 2020 11:34
-
-
Save elderfo/4c8da595c30f4347b27c5e4d23ed2758 to your computer and use it in GitHub Desktop.
Install TC VS Test Logger
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$zipFile = "$($env:TEMP)\TeamCity.VSTest.TestLogger.zip" | |
$zipOutput = "$($env:TEMP)\TeamCity.VSTest.TestLogger" | |
$loggerPath = "$($zipOutput)\vstest15" | |
$vsTestExtensions = "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\Extensions\TestPlatform\Extensions" | |
try { | |
Invoke-WebRequest -Uri "http://teamcity.jetbrains.com/guestAuth/app/rest/builds/buildType:TeamCityPluginsByJetBrains_TeamCityVSTestTestAdapter_Build,pinned:true,status:SUCCESS,branch:master,tags:release/artifacts/content/TeamCity.VSTest.TestLogger.zip" -OutFile $zipFile | |
Add-Type -AssemblyName System.IO.Compression.FileSystem | |
[System.IO.Compression.ZipFile]::ExtractToDirectory($zipFile, $zipOutput) | |
Copy-Item -Path "$($loggerPath)\*" -Destination $vsTestExtensions | |
} finally { | |
If (Test-Path $zipOutput){ | |
Remove-Item $zipOutput -Force -Recurse | |
} | |
If (Test-Path $zipFile){ | |
Remove-Item $zipFile -Force | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment