How to Get the Code Coverage Data Into SonarQube

The code coverage is an important part of the quality metrics of SonarQube. Unfortunately, SonarQube needs some extra steps to use our code coverage reports from our Azure DevOps pipeline as part of its code analysis. As in the last posts on code coverage, we again use Coverlet and ReportGenerator as part of our Azure …

Read more

Publishing Code Coverage in Your Azure DevOps Build Pipeline

Last week we used Coverlet and ReportGenerator to collect code coverage on our development machines. In this post we continue this journey and extend our build pipelines to get a nice coverage report with every continuous integration build.   Extending the test task We can collect the code coverage files in the build pipeline by …

Read more

Code Coverage made Easy: A Step-by-Step Guide for .NET 6

For .Net 4.8 it was enough to install Visual Studio Enterprise Edition on the build server and check the box for code coverage in the Testing task of Azure DevOps. The build agent then collected the coverage data and published it as part of your builds. Unfortunately, for .Net 6 this no longer works, and …

Read more

Azure and Terraform: What to Do if .Net 7 Is Unknown?

After we figured out the problem with the AlwaysOn default setting between Terraform and a Linux environment in Azure, we run into the next Problem: Error: expected site_config.0.application_stack.0.dotnet_version to be one of [3.1 5.0 6.0], got 7.0 Should you ever run into a problem like this, make sure that you update the Azure Resource Manager …

Read more

Azure & Terraform: The Tiny but Important Difference Between Windows & Linux

As part of the release build of our user group site, we use Terraform to create a BDD environment from scratch, run the acceptance tests and then destroy the environment to keep the cost down. As we recently switched the BDD environment from Windows to Linux, we run into this error: Error: creating Linux Web …

Read more

What to Do if GitVersion Does Not Recognise Your Main Branch

At the user group site, we use GitVersion to turn our git history into a Semantic Version number. After we switched to main as the default branch, our build failed with this error message: ERROR [****] An unexpected error occurred: System.InvalidOperationException: Could not find a ‘develop’ or ‘master’ branch, neither locally nor remotely. GitVersion did …

Read more