title: Exclude auto properties from Code Coverage in Visual Studio 2015
body: <p>I just upgraded a bunch of projects to VS2015/C#6.</p>
  
  <p>Now MSTest's Code Coverage analysis is reporting that some auto properties aren't covered by unit tests. This wasn't the case in Visual Studio 2013, and I suspect it may be something to do with the new autoproperty features in C#6.</p>
  
  <p>Dealing with all the false-positives this generates rather defeats the purpose of the Code Coverage tool as it makes it practically impossible to identify actual code lacking test coverage. We don't want to write unit tests for all our DTOs, and I'd really rather not have to go through the project annotating every single auto-property with <code>ExcludeFromCodeCoverage</code>.</p>
  
  <p>I've created a working MCVE at <a href="https://github.com/iaingalloway/VisualStudioCodeCoverageIssue">https://github.com/iaingalloway/VisualStudioCodeCoverageIssue</a></p>
  
  <hr>
  
  <ul>
  <li>Open <code>VisualStudio2013.sln</code> in Visual Studio 2013 Premium or Ultimate.</li>
  <li>Click Test -> Analyze Code Coverage -> All Tests.</li>
  <li>Observe that the "Code Coverage Results" window reports 0 Blocks "Not Covered".</li>
  </ul>
  
  <hr>
  
  <ul>
  <li>Open <code>VisualStudio2015.sln</code> in Visual Studio 2015 Enterprise.</li>
  <li>Click Test -> Analyze Code Coverage -> All Tests.</li>
  <li>Observe that the "Code Coverage Results" window reports 1 Block "Not Covered" (the getter for ExampleDto.Value)</li>
  </ul>
  
  <hr>
  
  <p><strong>Is it possible to configure the built-in Code Coverage tool in Visual Studio 2015 to ignore auto-properties like Visual Studio 2013 does?</strong></p>