[JetBrains dotCover] Failed to perform coverage analysis Follow
Hi,
I am running dotcover as part of cake script. I use Azure DevOps and my own agent. The script works without any issue on the hosted agent from Azure DevOps. but its throwing the below error on my hosted agent.
I updated windows, restarted multiple times and there is nothing on the Windows registry, to delete HKEY_CURRENT_USER\Software\JetBrains\Profiler.
JetBrains dotCover Console Runner 2018.2.3. Build 777.0.20180912.160624
[JetBrains dotCover] Coverage session started [12/6/2018 12:57:37 PM]
[JetBrains dotCover] Failed to perform coverage analysis. Operation was canceled by user
Failed to verify x64 COM object registration: Empty path to COM object.
##[error]An error occurred when executing task 'Run-Unit-Tests'.
##[debug]Processed: ##vso[task.logissue type=error;]An error occurred when executing task 'Run-Unit-Tests'
##[error] DotCover: Process returned an error (exit code -2).
##[debug]Processed: ##vso[task.logissue type=error;] DotCover: Process returned an error (exit code -2).
##[error]System.Exception: Unexpected exit code 1 returned from tool Cake.exe
##[debug]Processed: ##vso[task.logissue type=error;]System.Exception: Unexpected exit code 1 returned from tool Cake.exe
at Microsoft.TeamFoundation.DistributedTask.Task.Internal.InvokeToolCmdlet.ProcessRecord()
at System.Management.Automation.CommandProcessor.ProcessRecord()
The cake task is as below
Task("Run-Unit-Tests")
.IsDependentOn("Build")
.Does(() =>
{
var pathToTestDll = "./src/**/bin/Release/*.Tests.dll";
DotCoverCover(tool => {
tool.XUnit2(pathToTestDll);
},
new FilePath(pathToArtifacts + "/DotCoverResult.dcvr"),
new DotCoverCoverSettings()
.WithFilter("+:*")
.WithFilter("-:*.Tests")
);
DotCoverReport(new FilePath( pathToArtifacts + "/DotCoverResult.dcvr"),
new FilePath(pathToArtifacts + "/DotCoverResult.html"),
new DotCoverReportSettings {
ReportType = DotCoverReportType.HTML
}
);
});
I have extracted dotcover and added the location to the PATH in environment variables. Is there anything I need to install to support this?
Update: It works locally on the slef hosted agents as well, just not from the Azure DevOps.
Thanks,
Sundar.
Please sign in to leave a comment.