# OpenCover and MSTest?

**URL:** https://www.finalbuilder.com/forums/t/opencover-and-mstest/5138
**Category:** Discussion
**Created:** [January 16, 2014, 9:44am UTC](https://www.finalbuilder.com/forums/t/opencover-and-mstest/5138 "2014-01-16T09:44:14Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![deleted\_user](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/deleted_user/32/937_2.png) [@deleted\_user](https://www.finalbuilder.com/forums/u/deleted_user)
#### Post date: [January 16, 2014, 9:44am UTC](https://www.finalbuilder.com/forums/t/opencover-and-mstest/5138/1 "2014-01-16T09:44:14Z")

</div>

Hi

I'm trying to collect coverage results for my ms test unittests, and it keeps saying "nothing collected cannot locate pdb files..."

If I go to the agent and run the exact same command there it works fine, what am I missing?

Also it would be nice if the coverage where a metric for the solution.

---

<div class="post-metadata">

### Author: ![Vincent](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/vincent/32/938_2.png) [@Vincent](https://www.finalbuilder.com/forums/u/Vincent)
#### Post date: [January 16, 2014, 10:29am UTC](https://www.finalbuilder.com/forums/t/opencover-and-mstest/5138/2 "2014-01-16T10:29:05Z")

</div>

What settings do you have in the action? We need more information.   
  
 As for adding metrics, it’s on the todo list.

---

<div class="post-metadata">

### Author: ![deleted\_user](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/deleted_user/32/937_2.png) [@deleted\_user](https://www.finalbuilder.com/forums/u/deleted_user)
#### Post date: [January 16, 2014, 10:50am UTC](https://www.finalbuilder.com/forums/t/opencover-and-mstest/5138/3 "2014-01-16T10:50:32Z")

</div>

Found a solution needed to register OpenCover.Profiler.dll with regsrv32, then it started collecting as expected.   
  
 For others who have the same problem, regsrv32 can be found in “Windows\system32” and for some reason on my system needed to be run from there.

---

<div class="post-metadata">

### Author: ![deleted\_user](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/deleted_user/32/937_2.png) [@deleted\_user](https://www.finalbuilder.com/forums/u/deleted_user)
#### Post date: [January 16, 2014, 10:51am UTC](https://www.finalbuilder.com/forums/t/opencover-and-mstest/5138/4 "2014-01-16T10:51:42Z")

</div>

Cool with coverage metrics.   
  
 We also want to be able to fail on low coverage, is there currently a way to do this.   
  
 Thank you for your swift reply.

---

<div class="post-metadata">

### Author: ![Vincent](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/vincent/32/938_2.png) [@Vincent](https://www.finalbuilder.com/forums/u/Vincent)
#### Post date: [January 28, 2014, 1:04am UTC](https://www.finalbuilder.com/forums/t/opencover-and-mstest/5138/5 "2014-01-28T01:04:44Z")

</div>

Hi Thomas   
  
 At the moment we don’t collect coverage metrics, so there’s no way to fail on this that I know of (normally you would use the stage gate conditions). Collecting coverage metrics is on the todo list, but I don’t know when we will get to it.
