You could walk 10 miles to work every day, but then that is much harder, longer and just a pain in the ass. This is basically the same reason I created this task for Azure DevOps.
Before I did have a command line that was running the JetBrain’s ReSharper DotCover CLI. This would do the job, but when using for multiple projects I would have to update/rewrite the code to run for each. This was also them messy as I would be maintaining code in the Build/Release pipeline.
Therefore I wrapped it up like a present into an Azure DevOps task, so I could pass in the commands I required in a repeatable process. This then gives myself and other a save way to process the DotCover CLI with minimal scope for mistakes from miss formatting.
I also learned from using the tool that you can use wide cards in the Target Arguments to target multiple project to run the coverage on. This means instead of targeting the solution that will run on everything, you can just target the projects you want to run.
Have a look and a run here > https://marketplace.visualstudio.com/items?itemName=cpateman.50a4f510-142a-11e8-85fe-290cdea90db9
You can also see the code behind the mask here on my GitHub > https://github.com/PureRandom/VstsCoverCoverageExtension/blob/master/README.md