0

I am using the OpenCover code coverage tool against silverlight application , but i am getting the following exception while running please help me.

Cmd line Argument :

D:\Work\Projects\IRI\AB\APTT\APTT 2.4.8\Dev\Application>OpenCover\OpenCover.Console.exe -register:user "-target:C:\Program Files (x86)\Internet Explorer\iexplore.exe" "-targetargs:http://localhost/APTT/Welcome.aspx" "-targetdir:D:\Work\Projects\IRI\AB\APTT\APTT 2.4.8\Dev\Application\IRI.PA.Web.Silve
rlight\Bin\Debug" -output:opencoverResult.xml 

Exception Detais :

An exception occured: Could not load file or assembly 'System.Core, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e,
stack:    at Autofac.Builder.RegistrationData..ctor(Service defaultService)
   at Autofac.Builder.RegistrationBuilder`3..ctor(Service defaultService, TActivatorData activatorData, TRegistrationStyle style)
   at Autofac.RegistrationExtensions.RegisterInstance[T](ContainerBuilder builder, T instance)
   at OpenCover.Framework.Bootstrapper.Initialise(IFilter filter, ICommandLine commandLine, IPersistance persistance, IPerfCounters pe
   at OpenCover.Console.Program.Main(String[] args) in c:\Projects\opencover.git\working\main\OpenCover.Console\Program.cs:line 67

Thanks in Advance.

Regards, Rakesh K

Shaun Wilde
  • 8,228
  • 4
  • 36
  • 56
Rakesh K
  • 11
  • 1
  • What version of OpenCover are you using? – Shaun Wilde Dec 03 '13 at 11:42
  • I am using version 4.5.1923 – Rakesh K Dec 05 '13 at 07:09
  • Are the silverlight assemblies [registered in the GAC](http://social.msdn.microsoft.com/Forums/silverlight/en-US/c68f4ed0-9305-4b7f-82f3-4559937c8d62/silverlight-systemcore-2050-reference-and-aspnet-systemcore-reference-3500?forum=silverlightdevtools)? – Shaun Wilde Dec 05 '13 at 12:00
  • Silverlight assemblies means are you referring to System.Core? When i have checked in GAC there was an System.Core dll with version 3.5. Later i have added even System.Core dll (Version 2.0.5.0)in GAC. Still facing the same issue. – Rakesh K Dec 09 '13 at 12:37

1 Answers1

0

What you are seeing looks like this issue Could not load file or assembly System.Core after updating to 1.6.1.1718 and it also seems to be related to AutoFac.

The suggested solution is to run a MS Patch KB2468871 - Update for the .NET Framework 4

Shaun Wilde
  • 8,228
  • 4
  • 36
  • 56