Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>5 hours later and this is a tumbleweed. I found some <a href="http://blogs.msdn.com/b/phuene/archive/2009/12/01/programmatic-coverage-analysis-in-visual-studio-2010.aspx" rel="noreferrer">additional detail here</a>, which helped get me further down the path.</p> <p>In order for this to work, you need to include a few additional files alongside the custom task and supply folder locations for the pdb's and instrumented dll's.</p> <p>Regarding additional files, you need the following:</p> <ol> <li>The custom build task must reference Microsoft.VisualStudio.Coverage.Analysis.dll</li> <li><p>Your bin folder must contain the following additional files:</p> <ul> <li>Microsoft.VisualStudio.Coverage.Symbols.dll</li> <li>dbghelp.dll</li> </ul></li> <li><p>(If you don't have visual studio installed, you must perform regsvr32.exe on msdia100.dll)</p></li> </ol> <p>Regarding paths to assemblies and symbols, the <em>CreateFromFile</em> method takes a collection of folders to search. What seems really strange is that error complains about not being able to locate missing instrumented assemblies, and it specifies the full path..</p> <blockquote> <p>Image file c:\project\output\Assembly.dll could not be found.</p> </blockquote> <p>...but if you specify that path, it doesn't work.</p> <pre><code> CoverageInfo current = CoverageInfo.CreateFromFile( "c:\project\testresults\x\In\data.coverage", new string[] { "c:\project\output" }, new string[] { "c:\project\output" }); </code></pre> <p>However, changing the path to be the folder of the TestResults output works fine:</p> <pre><code> CoverageInfo current = CoverageInfo.CreateFromFile( "c:\project\testresults\x\In\data.coverage", new string[] { "c:\project\testresults\x\Out" }, new string[] { "c:\project\testresults\x\Out" }); </code></pre> <p>I question whether "instrument in place" really means <em>in that folder</em>, or instrument and copy to the MS Test run folder.</p> <p>Well dear SO folk, if you're reading this, you get a cookie.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload