I am trying to add a task to our build pipeline in Azure DevOps to calculate our code coverage using the dotCover commandline tool. However, I am getting the following error.
Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.QualityTools.Common, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
at Microsoft.VisualStudio.TestTools.RunnerCommandline.Runner.Main(String[] args)
I have added a reference to the assembly Microsoft.VisualStudio.QualityTools.Common to our tests project and have set Copy Local to true so it gets copied into the bin folder.
Here is my command for executing dotCover (I have added dotCover and MSTEST to our project so we can run it from Azure DevOps).
dotCover.exe analyse /TargetExecutable="Tools\MSTest\MSTest.exe" /TargetArguments="/testcontainer:\MyServices.Tests\bin\MyServices.Tests.dll" /Output="output.html" /ReportType="HTML"
UPDATE 09.10.2019
Here is the reference to the assembly in my .csproj. I have added a reference to v15 of the assembly.
<Reference Include="Microsoft.VisualStudio.QualityTools.Common, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />