c# - Why System.Core fails to load when adding Coded UI support for Silverlight 5 application? -
i'm having following problem:
trying add support creating coded ui test silverlight 5 application ([msdn][1]). first step reference assembly microsoft.visualstudio.testtools.uitest.extension.silverlightuiautomationhelper.dll in silverlight 5 project. unfortunately, after reference has been added, projects stops compile number of similar errors:
>
error 25 cannot resolve reference assemblies. please check reference assemblies. not load file or assembly 'system.core, version=5.0.5.0, culture=neutral, publickeytoken=7cec85d7bea7798e' or 1 of dependencies. located assembly's manifest definition not match assembly reference. (exception hresult: 0x80131040) ....\errorreportdialog.xaml looks system.core 5.0.5.0 fails load, okay, debugging assemblies loading fuslogw produces 2 interesting logs: first log: > assembly binder log entry (04.03.2013 @ 14:07:49) operation successful. bind result: hr = 0x0. operation completed successfully. assembly manager loaded from: c:\windows\microsoft.net\framework\v4.0.30319\clr.dll running under executable c:\windows\microsoft.net\framework\v4.0.30319\msbuild.exe detailed error log follows. === pre-bind state information === log: displayname = system.core, version=5.0.5.0, culture=neutral, publickeytoken=7cec85d7bea7798e (fully-specified) log: appbase = file:///c:/windows/microsoft.net/framework/v4.0.30319/ log: initial privatepath = null log: dynamic base = null log: cache base = null log: appname = msbuild.exe calling assembly : system.windows, version=5.0.5.0, culture=neutral, publickeytoken=7cec85d7bea7798e. log: bind starts in loadfrom load context. wrn: native image not probed in loadfrom context. native image probed in default load context, assembly.load(). log: using application configuration file: c:\windows\microsoft.net\framework\v4.0.30319\msbuild.exe.config log: using host configuration file: log: using machine configuration file c:\windows\microsoft.net\framework\v4.0.30319\config\machine.config. log: post-policy reference: system.core, version=5.0.5.0, culture=neutral, publickeytoken=7cec85d7bea7798e log: binding succeeds. returns assembly c:\program files (x86)\reference assemblies\microsoft\framework\silverlight\v5.0\system.core.dll. log: assembly loaded in loadfrom load context. looks system.core, version=5.0.5.0, culture=neutral, publickeytoken=7cec85d7bea7798e loads succesfully. second log entry produces following error: > assembly binder log entry (04.03.2013 @ 14:07:49) operation failed. bind result: hr = 0x80131040. no description available. assembly manager loaded from: c:\windows\microsoft.net\framework\v4.0.30319\clr.dll running under executable c:\windows\microsoft.net\framework\v4.0.30319\msbuild.exe detailed error log follows. pre-bind state information log: displayname = system.core, version=2.0.5.0, culture=neutral, publickeytoken=7cec85d7bea7798e (fully-specified) log: appbase = file:///c:/windows/microsoft.net/framework/v4.0.30319/ log: initial privatepath = null log: dynamic base = null log: cache base = null log: appname = msbuild.exe calling assembly : microsoft.visualstudio.testtools.uitest.extension.silverlightuiautomationhelper, version=10.0.30319.381, culture=neutral, publickeytoken=b03f5f7f11d50a3a. log: bind starts in default load context. log: using application configuration file: c:\windows\microsoft.net\framework\v4.0.30319\msbuild.exe.config log: using host configuration file: log: using machine configuration file c:\windows\microsoft.net\framework\v4.0.30319\config\machine.config. log: redirect found in application configuration file: 2.0.5.0 redirected 5.0.5.0. log: post-policy reference: system.core, version=5.0.5.0, culture=neutral, publickeytoken=7cec85d7bea7798e log: same bind seen before, , failed hr = 0x80131040. err: unrecoverable error occurred during pre-download check (hr = 0x80131040).
looks microsoft.visualstudio.testtools.uitest.extension.silverlightuiautomationhelper.dll tries load system.core, version=2.0.5.0, culture=neutral, publickeytoken=7cec85d7bea7798e, being redirected system.core, version=5.0.5.0, culture=neutral, publickeytoken=7cec85d7bea7798e (already loaded 1st log) , still fails load.
can provide insight on how further debug problem? i'm compiling silverlight projects anycpu platform. [1]: http://msdn.microsoft.com/en-us/library/gg413374.aspx
to confirm version of system.core required silverlightuiauthomationhelper following:
- find referenced silverlightuiauthomationhelper dll on disk.
- load in disassembler/reflector - example dotpeek or reflector.
- check versions of referenced assemblies - system.core must 2.0.5.0 in version of silverlightuiauthomationhelper
possible solutions:
- update silverlightuiauthomationhelper new version (link in hans passant comment) references new system.core dll (version 5.0.5.0)
- because fuslogvw says redirect 2.0.5.0 5.0.5.0 located in application configuration file - try find , remove redirect (details here). possible else break.
Comments
Post a Comment