Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save goyalmohit/b5955c88bcbe874476a2417512511ad3 to your computer and use it in GitHub Desktop.
Save goyalmohit/b5955c88bcbe874476a2417512511ad3 to your computer and use it in GitHub Desktop.
Convert .coverage files to .coveragexml files for .NET Core Code coverage
Get-ChildItem -Recurse -Filter "*.coverage" | % {
$outfile = "$([System.IO.Path]::GetFileNameWithoutExtension($_.FullName)).coveragexml"
$output = [System.IO.Path]::Combine([System.IO.Path]::GetDirectoryName($_.FullName), $outfile)
"Analyse '$($_.Name)' with output '$outfile'..."
. $env:USERPROFILE\.nuget\packages\microsoft.codecoverage\15.8.0\build\netstandard1.0\CodeCoverage\CodeCoverage.exe analyze /output:$output $_.FullName
}
"Done"
@command0r
Copy link

The script doesn't work. Rolls to "Done" every time I run it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment