PDA

View Full Version : nhibernate .9 - log4net



stephenro
08-04-2005, 03:29 PM
I have upgraded nhibernate to .9, but I am getting the following error:

=== Pre-bind state information ===
LOG: DisplayName = log4net, Version=1.2.0.30714, Culture=neutral, PublicKeyToken=b32731d11ce58905
(Fully-specified)
LOG: Appbase = file:///C:/development/WellnessRecord/wellnessrecord_web
LOG: Initial PrivatePath = bin
Calling assembly : Spring.Core, Version=0.6.0.0, Culture=neutral, PublicKeyToken=null.
===

LOG: Publisher policy file is not found.
LOG: No redirect found in host configuration file (C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\aspn et.config).
LOG: Using machine configuration file from C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\confi g\machine.config.
LOG: Post-policy reference: log4net, Version=1.2.0.30714, Culture=neutral, PublicKeyToken=b32731d11ce58905
LOG: Attempting download of new URL file:///C:/WINDOWS/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET Files/wellnessrecord/8dbac319/d87a6ecf/log4net.DLL.
LOG: Attempting download of new URL file:///C:/WINDOWS/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET Files/wellnessrecord/8dbac319/d87a6ecf/log4net/log4net.DLL.
LOG: Attempting download of new URL file:///C:/development/WellnessRecord/wellnessrecord_web/bin/log4net.DLL.
WRN: Comparing the assembly name resulted in the mismatch: Revision Number

Is there a simple fix or will I have to go back to nhibernate .8.4 which uses an earlier version of log4net.

TIA

Steve

Rick Evans
08-04-2005, 04:08 PM
Hiya

You will be able to change the version of Log4NET that Spring uses via the use of a binding redirect in the config file for your [web application | application]; to wit...


<configuration>



<runtime>
<assemblyBinding xmlns="urn&#58;schemas-microsoft-com&#58;asm.v1">
<dependentAssembly>
<assemblyIdentity
name="log4net"
publicKeyToken="b32731d11ce58905"
culture="neutral"/>
<bindingRedirect
oldVersion="1.2.0.30714"
newVersion="1.2.9.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>

</configuration>

Spring.NET doesn't use anything other than the LogManager and ILog classes from the Log4NET library, so you should be sorted if you insert the above snippet of XML into your [web application | application] .config file.

Ciao
Rick