Reputation: 11793
All, I am stuck in a problem which drive me crazy... please help to review it . thanks in advance.
I want to reference a NHibernate.dll
to my website with the version number 2.1.0.4000
.
But I didn't know why the website always to search the NHibernate.dll
of version number 2.1.2.4000
when I try to debug it.
Here is what I try to do .
fuslogvw
to trace the assembly binding .
you can see the application want to bind the 2.1.2.4000
which is not my desired version.
remove all the reference of Nhibernate
in my solution. and add the right one again.
To the website project. I found the dll I just added show auto update
in the version number column instead of the right version number in the reference dialog. I don't why.
Could someone please help to give me some idea to figure out what happened to it . thanks. any comments are welcome.
updated
I searched with key text "NHibernate" in the Web.Config
the content about it is below.
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Iesi.Collections" publicKeyToken="aa95f207798dfdb4"/>
<bindingRedirect oldVersion="1.0.0.3" newVersion="1.0.1.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="NHibernate" publicKeyToken="aa95f207798dfdb4"/>
<bindingRedirect oldVersion="2.0.1.4000" newVersion="2.1.0.4000"/>
</dependentAssembly>
</assemblyBinding>
<assemblyBinding appliesTo="v2.0.50727" xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Oracle.DataAccess" publicKeyToken="89b483f429c47342" processorArchitecture="amd64"/>
<bindingRedirect oldVersion="2.102.4.0" newVersion="2.112.2.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Oracle.DataAccess" publicKeyToken="89b483f429c47342" processorArchitecture="ia64"/>
<bindingRedirect oldVersion="2.102.4.0" newVersion="2.112.2.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
updated
I checked dll in the Reflector
, Anything wrong with it ?
Updated
The manifast of ILdasm shows below
Updated
Sometimes I found the log shows some clue which assembly reference the wrong dll. you can see "Calling assembly: xxxx.dll, version=........."
Upvotes: 0
Views: 156
Reputation: 1384
It looks like its an issue with your dll
file itself. The manifest of the .dll
file has declared the version details in a wrong way. Try to download another copy of the file from some other resource. Now clean your solution, add a reference to it and rebuild the solution. The error should go.
Upvotes: 2