Hello,
I have two VS 2012 projects: a console application and a VS 2012 test project.
On both cases I installed a Package which depends on Structure Map.
The Console Application works fine but the test project gives the following error:
Could not load file or assembly 'StructureMap, Version=2.6.3.0, Culture=neutral, PublicKeyToken=
e60ad81abae3c223'
or one of its dependencies. The located assembly's manifest definition
does not match the assembly reference. (Exception from HRESULT:
0x80131040)
On the App.Config I have the following:
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="StructureMap" publicKeyToken="e60ad81abae3c223" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.6.4.0" newVersion="2.6.4.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
I checked the GAC, Temporary
ASP.NET files and so on ... I keep getting the error.
Then with Fusion Log Viewer I got the following:
*** Assembly Binder Log Entry (27-08-2012 @ 02:06:03) ***
The 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:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO 11.0\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\TESTWINDOW\vstest.executionengine.x86.exe
--- A detailed error log follows.
=== Pre-bind state information ===
LOG: User = Fly\Miguel
LOG: DisplayName = StructureMap, Version=2.6.3.0, Culture=neutral, PublicKeyToken=e60ad81abae3c223
(Fully-specified)
LOG: Appbase = file:///C:/Users/Miguel/Desktop/TEMP/UnitTestProject1/UnitTestProject1/bin/Release
LOG: Initial PrivatePath = NULL
LOG: Dynamic Base = NULL
LOG: Cache Base = NULL
LOG: AppName = NULL
Calling assembly : UnitTestProject1, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\Users\Miguel\Desktop\TEMP\UnitTestProject1\UnitTestProject1\bin\Release\UnitTestProject1.dll.config
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Post-policy reference: StructureMap, Version=2.6.3.0, Culture=neutral, PublicKeyToken=e60ad81abae3c223
LOG: GAC Lookup was unsuccessful.
LOG: Attempting download of new URL file:///C:/Users/Miguel/Desktop/TEMP/UnitTestProject1/UnitTestProject1/bin/Release/StructureMap.DLL.
LOG: Assembly download was successful. Attempting setup of file: C:\Users\Miguel\Desktop\TEMP\UnitTestProject1\UnitTestProject1\bin\Release\StructureMap.dll
LOG: Entering run-from-source setup phase.
LOG: Assembly Name is: StructureMap, Version=2.6.4.0, Culture=neutral, PublicKeyToken=e60ad81abae3c223
WRN: Comparing the assembly name resulted in the mismatch: Build Number
ERR: The assembly reference did not match the assembly definition found.
ERR: Run-from-source setup phase failed with hr = 0x80131040.
ERR: Failed to complete setup of assembly (hr = 0x80131040). Probing terminated
Again, everything the problem is only in the VS 2012 Test Project ...
Does anyone has any idea what might be wrong?
----
Thank You,
Miguel