Skip to content
This repository has been archived by the owner on Nov 15, 2021. It is now read-only.

Silverlight Support

Shaun Wilde edited this page May 5, 2013 · 1 revision

Silverlight has been supported for a while but constant changes to IE make it hard to support or integrate.

For those of you wishing to try this out here are a few tips that might help you.

  1. Make sure you are running OpenCover from a command prompt with elevated permissions i.e. Administrator mode. I have found that the profiler does not load otherwise.

  2. Use the -targetdir option to point to the folder containing the PDB files. A XAP file does not contain PDB files (AFAIK) and OpenCover needs these files in order to know where to add coverage information.

    Example:

    OpenCover.Console.exe 
      -register:user 
      -targetdir:"P:\projects\throwaway\SampleSilverlight\SampleSilverlight\Bin\Debug" 
      -target:"C:\Program Files (x86)\Internet Explorer\iexplore.exe" 
      -targetargs:"http://localhost:4128/SampleSilverlightTestPage.aspx"
  1. If you have IE10 installed then you may need to use an alternate browser (I use FireFox for this purpose on Windows8) when trying to integrate OpenCover with your Silverlight Application e.g. if you are using a unit testing framework that runs as a silverlight application.