0

我正在对 silverlight 应用程序使用 OpenCover 代码覆盖工具,但在运行时出现以下异常,请帮助我。

命令行参数:

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 

异常详情:

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

提前致谢。

问候, 拉克什 K

4

1 回答 1

0

您所看到的看起来像这个问题在更新到 1.6.1.1718 后无法加载文件或程序集 System.Core,它似乎也与 AutoFac 有关。

建议的解决方案是运行 MS 补丁KB2468871 - .NET Framework 4 更新

于 2013-12-09T20:27:49.937 回答