Note that there are some explanatory texts on larger screens.

plurals
  1. POMerging Visual Studio Code Coverage fails with ImageNotFoundException
    primarykey
    data
    text
    <p>I'm trying to export visual studio code coverage files (data.coverage) into xml as described in <a href="http://blogs.msdn.com/b/phuene/archive/2009/12/04/programmatic-code-coverage-data-merging-in-visual-studio-2010.aspx" rel="nofollow">this blog post from the code analysis team</a>. I've moved the code example in that post into a custom MSBuild task. My custom task references the <em>Microsoft.VisualStudio.Coverage.Analysis.dll</em> located in the PrivateAssemblies folder of Visual Studio.</p> <p>Right off the bat, trying to load the code coverage file throws an code analysis typed exception ImageNotFoundException, stating that the "Image file <em>fully-qualified-file-path-to-dll</em> could not be found."</p> <pre><code> // the following line throws an exception CoverageInfo current = CoverageInfo.CreateFromFile( "c:\path\testresults\x\y\z\data.coverage"); </code></pre> <p>The path is fully qualified and the DLL it refers to does exist. My testsettings has this file listed as the assembly to instrument and the "Instrument in place" checkbox is set. I can view code coverage within Visual Studio, so I know coverage is working.</p> <p>I'm running my MSBuild script from the Visual Studio command line. It looks like this:</p> <pre><code>&lt;Project ToolsVersion="4.0" DefaultTargets="Default;" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"&gt; &lt;UsingTask TaskName="CustomTasks.MergeCoverageTask" AssemblyFile="CustomTasks.dll" /&gt; &lt;Target Name="Default"&gt; &lt;ItemGroup&gt; &lt;CoverageFiles Include="**\data.coverage" /&gt; &lt;/ItemGroup&gt; &lt;MergeCoverageTask CoverageFiles="@(CoverageFiles)" OutputFile="output.xml" /&gt; &lt;/Target&gt; &lt;/Project&gt; </code></pre> <p>Can anyone suggest what I need to do to get this working correctly?</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.
 

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