Code coverage not working TFS build
<p>I have enabled the code coverage in the build definition for a project in TFS. 
<a href="https://i.stack.imgur.com/E3zIv.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/E3zIv.jpg" alt="enter image description here"></a></p>

<p>It's building as expected, unit tests are running as well but code coverage shows "No build coverage data available" see the screenshot below.</p>

<p><a href="https://i.stack.imgur.com/WzANx.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/WzANx.jpg" alt="enter image description here"></a></p>

<p>Any help is appreciated.</p>