У меня на локальной машине следующая команда:
C:\Tools\opencover\OpenCover.Console.exe
-register
-target:C:\local-source\develop\Lib\NuGetPackages\xunit.runner.console.2.4.0\tools\net462\xunit.console.exe
-targetargs:"C:\local-source\Develop\Src\LN.B.Tests.Integration\bin\Release\LN.B.Tests.Integration.dll -noshadow"
-output:TestCoverage.xml
-log:Verbose
"-filter:+[*]* -[*xunit*]* -[*RefEmit_InMemoryManifestModule*]* -[*AutoFixture*]*"
Команда отображает следующий вывод, который ожидается:
Visited Classes 1103 of 5472 (20.16)
Visited Methods 9832 of 65663 (14.97)
Visited Points 25472 of 318612 (7.99)
Visited Branches 13949 of 209530 (6.66)
==== Alternative Results (includes all methods including those without corresponding source) ====
Alternative Visited Classes 1324 of 6608 (20.04)
Alternative Visited Methods 10689 of 73849 (14.47)
Теперь я хочу запустить ту же команду на сервере сборки, нацеленную на dll, генерируемую при ежедневной сборке:
C:\Tools\opencover\OpenCover.Console.exe
-register
-target:D:\Build\XG5\BuildDeployDev1\Lib\NuGetPackages\xunit.runner.console.2.4.0\tools\net462\xunit.console.exe
-targetargs:"Src\LN.B.Tests.Integration\bin\Release\LN.B.Tests.Integration.dll -noshadow"
-output:TestCoverage.xml
-log:Verbose
"-filter:+[*]* -[*xunit*]* -[*RefEmit_InMemoryManifestModule*]* -[*AutoFixture*]*"
По какой-то причине вывод другой, и я не могу понять, почему:
Visited Classes 61 of 405 (15.06)
Visited Methods 591 of 4729 (12.5)
Visited Points 3295 of 26321 (12.52)
Visited Branches 2017 of 16924 (11.92)
==== Alternative Results (includes all methods including those without corresponding source) ====
Alternative Visited Classes 67 of 458 (14.63)
Alternative Visited Methods 635 of 5341 (11.89)
Глядя на файл журнала, я получаю много Cannot instrument D:\Jenkins\workspace\XG5_OpenCover2.2\Src\LN.B.Tests.Integration\bin\Release\LN.Common.Repository.dll as no PDB/MDB could be loaded
, и в результате мои dll выводятся в виде: MissingPDB
- Мой пользователь имеет права администратора на обеих машинах: admin
- Opencover версия: 4.6.519.0 (То же поведение с более новой версией)
- Я проверил, что встроенные pdbs "только для PDB"
- Я пробовал
-register:user
, -register:Path32
и -register:Path64
- Я пытался запустить
regsvr32 "C:\Tools\opencover\x64\OpenCover.Profiler.dll"
и "C:\Tools\opencover\x32\OpenCover.Profiler.dll"
- Я просмотрел: https://github.com/opencover/opencover/blob/master/main/OpenCover.Documentation/Usage.pdf
Что еще я могу попытаться исправить эту проблему? Я думаю, что я исчерпал все варианты.