log4net affecting other projects which don't even use it
- by Graeme
I'm seeing something really strange happening with some projects I'm working on.
I used log4net in an MVC web site and this was working great.
I then was working on a totally unrelated Console application which uses the SharePoint API and as soon as I include the following line (other lines don't cause the problem)
SPLimitedWebPartManager spWebPartManager = web.GetLimitedWebPartManager("http://blah/blah.aspx?PageView=Shared", System.Web.UI.WebControls.WebParts.PersonalizationScope.Shared);
I get the following message in the console app
log4net:ERROR XmlConfigurator: Failed to find configuration section 'log4net' in
the application's .config file. Check your .config file for the <log4net> and <
configSections> elements. The configuration section should look like: <section n
ame="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler,log4net" /
>
log4net:ERROR XmlConfigurator: Failed to find configuration section 'log4net' in
the application's .config file. Check your .config file for the <log4net> and <
configSections> elements. The configuration section should look like: <section n
ame="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler,log4net" /
>
I get this twice after a small delay. The delay is probably the request to get the web part manager from the page but I'm not sure why this log4net error is showing up in this project. I've gone through the code and bin folders etc. and found no trace of any log4net mentions.
Any ideas why this might be happening?