|
If it is a problem find the app's config file. I found
that the following works: log4net.Config.DOMConfigurator.Configure( new System.IO.FileInfo( AppDomain.CurrentDomain.SetupInformation.ConfigurationFile) ); Marc Paul Ingles wrote: Hi, This follows somewhat on from my post a few days ago.I have a class library that uses log4net to provide logging, this is then consumed within a standard console application. I've applied the attribute to the class library assembly within the project's AssemblyInfo.cs file as follows: [assembly: log4net.Config.DOMConfigurator(ConfigFileExtension="log4net", Watch=true)] The class library assembly is named PPF.Import, and so I've named the log4net config file PPF.Import.log4net. When I try and run the console app a file load exception is thrown: "Additional information: The located assembly's manifest definition with name 'log4net' does not match the assembly reference." So, I've tried renaming the log4net configuration file to PPF.Import.ImporterApp.exe.log4net, and placed it within the console application's output directory but the problem remains. I then tried applying the DOMConfigurator attribute to the console application's assembly, hoping that would pick up the log4net configuration file but again no joy. Thanks again for any suggestions. Paul --
This electronic message transmission, including any attached files, contains information which may be confidential and/or privileged. The information is intended to be for the SOLE use of the individual or entity named above. If you are not the intended recipient, be aware that any review, disclosure, copying, distribution or use of the contents of this information is prohibited. This message is not to be forwarded for any reason without prior consent of the sender. If you have received this electronic transmission in error, please notify the sender immediately by telephone (250) 386-4266 or by a "reply to sender only" message and destroy all electronic and hard copies of the communication, including attachments, without reading or saving in any manner. |
<<inline: image001.jpg>>
