Hi I am usign NHibernate version 1.0.4.
Before I even come to load my mapping file i get below described exception. The exeption appear when calling code line.
cfg = new NHibernate.Cfg.Configuration();
I use loading mapping file from code (cfg.AddFile(mapping_file)).
What is interesting is that when I used stand alone aplication (C# project not connected with other projects) to test my database access it works fine.
The error appears when I merge my files with solution that bind more C# projects.
The exception description is:
"InnerException {"Could not load file or assembly 'log4net, Version=1.2.9.0, Culture=neutral, PublicKeyToken=b32731d11ce58905' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)":"log4net, Version=1.2.9.0, Culture=neutral, PublicKeyToken=b32731d11ce58905"} System.Exception {System.IO.FileLoadException}"
I am pretty desperate while I try to solve this issue already dor three dayswith no success.
Can anybody help me...
I didn't describe other details needed for help, while form my opinion they aren't relevant.
My application file is below.
Thanks in advance
gpum
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler,log4net, Version=1.2.10.0" />
<section name="nhibernate" type="System.Configuration.NameValueSectionHandler, System, Version=2.0.5000.0,Culture=neutral, PublicKeyToken=b77a5c561934e089" />
</configSections>
<!-- This section contains the log4net configuration settings -->
<log4net>
<!-- Define some output appenders -->
<appender name="rollingFile" type="log4net.Appender.RollingFileAppender,log4net" >
<param name="File" value="log.txt" />
<param name="AppendToFile" value="true" />
<param name="RollingStyle" value="Date" />
<param name="DatePattern" value="yyyy.MM.dd" />
<param name="StaticLogFileName" value="true" />
<layout type="log4net.Layout.PatternLayout,log4net">
<param name="ConversionPattern" value="%d [%t] %-5p %c [%x] <%X{auth}> - %m%n" />
</layout>
</appender>
<!-- Setup the root category, add the appenders and set the default priority -->
<root>
<priority value="ALL" />
<appender-ref ref="rollingFile" />
</root>
</log4net>
<nhibernate>
<add key="hibernate.connection.provider"
value="NHibernate.Connection.DriverConnectionProvider" />
<add key="hibernate.dialect"
value="NHibernate.Dialect.PostgreSQLDialect" />
<add key="hibernate.connection.driver_class"
value="NHibernate.Driver.NpgsqlDriver" />
<add key="hibernate.connection.connection_string"
value="Server=localhost;Database=varanus;User ID=admin;Password=ki2ki;Encoding=UNICODE" />
<!-- <add key="hibernate.default_schema"
value="testDB.public" />-->
<add
key="hibernate.show_sql"
value="true"
/>
</nhibernate>
</configuration>
|