I\'m trying to fail builds in TFS Service (Hosted TFS2012) when Code Coverage is below a threshold.
I\'ve been messing around with the solution at http://scrumdod.bl
Just one thing on the solution above, you should revise the calculation to be like this to ensure a percentage value is returned to two decimal places
return (totalCoveredBlocks == 0 && totalUncoveredBlocks == 0)
? 0.0
: Math.Round(((double)totalCoveredBlocks) /
((double)(totalCoveredBlocks + totalUncoveredBlocks)) * 100, 2);