0

I am new in OpenCover for .net, i read there documentation, I succeed to cover a Tests applications by targeting MSTest.exe but most of times i don't want to create a unit test for projects, in that case, can i target my app directly like that:

OpenCover.console.exe "-target:D:\Coverage\Chars\bin\Debug\Chars.exe" -filter:+[*]* -output:D:\Coverage\Reports\Coverage.xml -targetdir:D:\Coverage\Chars\bin\Debug\

I tried the above line but i got this error:

No results - no assemblies that matched the supplied filter were instrumented
this could be due to missing PDBs for the assemblies that match the filter
please review the output file and refer to the Usage guide (Usage.rtf)

I searched a lot but didn't succeed. What am i doing wrong?

kyrylomyr
  • 12,192
  • 8
  • 52
  • 79
  • What happens when you remove the `-filter` option? – leppie Jan 08 '14 at 09:05
  • It's not a good practice to include unit tests into you application project. I'd recommend using separate class library project. – realnero Jan 08 '14 at 09:05
  • Even i remove -filter option i got the same error message Akram – Akram Kamal Qassas Jan 08 '14 at 09:07
  • Thanks everyone, I found the missed part, it's the arg -register:user OpenCover.console.exe "-target:D:\Coverage\Chars\bin\Debug\Chars.exe" -output:D:\Coverage\Reports\Coverage.xml -targetdir:D:\Coverage\Chars\bin\Debug\ -filter:+[*]* -register:user Thanks, Akram – Akram Kamal Qassas Jan 08 '14 at 10:30

0 Answers0