Coveralls uploader for .Net Code coverage of your C# source code. Should work with any code files that get reported with the supported coverage tools, but the primary focus is CSharp.
|Branch||Appveyor||Travis||TeamCity||AppVeyor Coverage||TeamCity Coverage|
The net5.0 way
The dotnet 3.1 way is using the dotnet SDK tools. This can be installed from version 3.0.0. You can use the
--version <VERSION> argument with any of these commands to pin to a particular version.
# Install globally: https://docs.microsoft.com/en-us/dotnet/core/tools/global-tools-how-to-use dotnet tool install --global coveralls.net # install locally: https://docs.microsoft.com/en-us/dotnet/core/tools/local-tools-how-to-use dotnet new tool-manifest dotnet tool install coveralls.net #restore again later dotnet tool restore
You can install prerelease versions as well directly from the build feed using the private source provided by appveyor NOTE: this is unstable and probably best limited for early testing only.
# globally dotnet tool install --global --add-source https://ci.appveyor.com/nuget/coveralls-net-t37a9a9unhwk coveralls.net # locally dotnet tool install --add-source https://ci.appveyor.com/nuget/coveralls-net-t37a9a9unhwk coveralls.net
To run the tool after installing:
# Globally csmacnz.Coveralls # Locally - don't forget to restore first if necessary dotnet tool run csmacnz.Coveralls # or dotnet csmacnz.Coveralls
The dotnet 3.1 way
The dotnet 3.1 way is using the dotnet SDK tools. This can be installed from version 2.0.0.
# install globally dotnet tool install --global coveralls.net --version 2.0.0 # install into a local folder dotnet tool install coveralls.net --version 2.0.0 --tool-path tools
To run the new version, simply use the command:
# if installed globally, this should just be available on your path csmacnz.Coveralls <args> # if installed into a tools path, you can run it from there. .\tools\csmacnz.Coveralls <args>
Haven't got the latest tools? You can still use the new version thanks to the published zip stand-alone app versions. These can be found in GitHub Releases for each platform,
For example on windows, you can download and unzip the windows stand-alone version:
# The TLS change was necessary on my development machine [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 $zipDownloadPath="https://github.com/csMACnz/coveralls.net/releases/download/2.0.0/coveralls.net.2.0.0-windows.zip" Invoke-WebRequest -UseBasicParsing $zipDownloadPath -OutFile coveralls-windows.zip mkdir coveralls-windows Expand-Archive .\coveralls-windows.zip coveralls-windows .\coveralls-windows\csmacnz.Coveralls.exe
pre dotnet 3.1
If you are not yet on 3.1 you can still use Version 1.0.0 which runs on dotnet 2.1 runtimes and above (using envvar
DOTNET_ROLL_FORWARD set to
Major for 3.0), following essentially the same instructions as above.
The older old way
Version 0.7.0 is still available on nuget at www.nuget.org/packages/coveralls.net. This is a full .Net Framework exe that even runs on mono.
To install coveralls.net you can find it by searching for
coveralls.net in the visual studio nuget extension, or install by running this command in the Package Manager Console.
PM> Install-Package coveralls.net -Version 0.7.0
You can get help for this older version using:
# on windows csmacnz.Coveralls.exe --help #on mono mono csmacnz.Coveralls.exe --help
For more information, checkout the old version readme: https://github.com/csMACnz/coveralls.net/blob/release-0.7.0/README.md
How To Use
Head over to the wiki for user guidance on how it works.
Sample applications using Coveralls.net to publish their results can be found in the csmacnz/Coveralls.net-Samples Project.
Supported Coverage Formats
- Mono Code Coverage (monocov)
- Visual Studio's Dynamic Coverage (based on ReportGenerator's support, using vstest.console.exe and CodeCoverage.exe)
- Visual Studio Coverage Export xml format
- NCover (classic 1.5.x format, at least)
- Coverlet (via its opencover output format
Full Supported, In Progress, and Future Support information can be found Coverage Support wiki page
Supported Build Servers
- TeamCity (using custom EnvVars)
Follow The App
You can ask questions and get updates using the twitter account coveralls.net (@coverallsdotnet).
This app (currently) uses psake to build and test, which is primarily just a wrapper of the dotnet cli for most cases.
If you want to use the full build steps rather than just Visual Studio or dotnet cli:
- Install psake:
choco install -y psake
- Enable using installed modules locally with
- Load psake using
- List tasks using
- Run build commands using
Invoke-psake unit-test(and others)
Mark Clearwater (Owner)
Throughput of this project (thanks to waffle.io)