I spent an hour debugging, and I finally eliminated the PEBCAK problem.
I have an international application. A key part of the application uses reflection for load types from configured sources. Therefore, there is an entry in the configuration like this:
<component type="Application.Component" assembly="Application, Version=2.0.0.0, Culture=neutral, PublicKeyToken=0123456789abcdef"/>
The application loads the component using this code:
var assembly = Assembly.Load(assemblyName);
var rawComponent = assembly.CreateInstance(typeName, false, BindingFlags.CreateInstance, null, instanceParams, CultureInfo.CurrentUICulture, null);
What error was unsuccessful when I signed the code. Here is the output from the merge log viewer:
*** Assembly Binder Log Entry (2010-10-21 @ 11:10:52) ***
The operation failed.
Bind result: hr = 0x80070002. The system cannot find the file specified.
Assembly manager loaded from: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll
Running under executable C:\Program Files (x86)\JetBrains\ReSharper\v5.1\Bin\JetBrains.ReSharper.TaskRunner.CLR4.MSIL.exe
--- A detailed error log follows.
=== Pre-bind state information ===
LOG: User = DOMAIN\user
LOG: DisplayName = Application.resources, Version=2.0.3946.17829, Culture=es-ES, PublicKeyToken=0123456789abcdef
(Fully-specified)
LOG: Appbase = file:///C:/Source/Application/UnitTests/bin
LOG: Initial PrivatePath = NULL
LOG: Dynamic Base = NULL
LOG: Cache Base = C:\Users\user\AppData\Local\Temp\w3gjhpl2.blr
LOG: AppName = Application.UnitTests
Calling assembly : Application, Version=2.0.3946.17829, Culture=neutral, PublicKeyToken=0123456789abcdef.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\Source\Application\UnitTests\bin\Application.UnitTests.dll.config
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config.
LOG: Post-policy reference: Application.resources, Version=2.0.3946.17829, Culture=es-ES, PublicKeyToken=0123456789abcdef
LOG: The same bind was seen before, and was failed with hr = 0x80070002.
ERR: Unrecoverable error occurred during pre-download check (hr = 0x80070002).
PEBCAK was that I spent an hour trying to figure out if there were problems with satellites in several cultures.
, , 2.0.0.0 (. ), 2.0.3946.17829, . , :
<component type="Application.Component" assembly="Application, Version=2.0, Culture=neutral, PublicKeyToken=0123456789abcdef"/>
, : , , CLR . ? ?