Wednesday, February 3, 2010

Code Coverage issues with Team Build

Allergic to failing builds, I always look at ways to stabilize our build process. Of course this is if the tooling doesn’t start to work against us. Last month we had some failing builds because the code coverage process was not closed thereby keeping the coverage files locked. This resulted in following error:

The process cannot access the file ‘data.coverage' because it is being used by another process.

Killing the VSPerfMon.exe process on the build server solves the problem but I don’t think we can see this as ‘the solution’. I haven’t find an alternative yet, so all ideas are welcome.

And of course this only happens in some occasions. Some people complained about the same issue on the MSDN forum.


Ben said...

Thanks for this, I had the same problem. In my case I had failed to correctly dispose my COM Excel Application which started filling up the task manager. By which time the processor was overworked and left processes floating all over the show.

Pascal Laurin said...

Same thing here. Running all the tests on my local machine and hunting for the one creating background threads is fun.

A shame MS did not fixed this yet.