Enabling Code Coverage in Visual Studio 2010
Hopefully this will save someone a minute or two.
In Visual Studio 2010 to enable Code Coverage, you edit the .TestSettings file (e.g. Local.TestSettings) – similar to the TestRunConfig file in Visual Studio 2008. Code Coverage no longer has its own section – it can be found under Data and Diagnostics where you can then set Code Coverage to enabled by checking the box.

The subtle thing I missed for a couple of minutes was that the Configure button at the top of the grid only is enabled when you select the Code Coverage row – and in there is the Code Coverage Detail dialog that lets you select the “artifacts to instrument”.
Looks pretty obvious now huh!


VSTS Links – 04/14/2010 « Team System Rocks! said,
[...] Stuart Preston on Enabling Code Coverage in Visual Studio 2010 [...]
Andrey said,
Thanks, I was missing the button there as well. Not the best place for it to be.
Add A Comment