I am trying to set the location of my log4net.config file programmaticly in my C# project, using .net 4.0 and v1.2.11 of log4net, like it is defined here. It looks straight forward enough but whenever I try to use the XmlConfigurator.Configure methid I get the following error:
Error 4 'log4net.Config.XmlConfigurator.Configure(log4net.Repository.ILoggerRepository, System.IO.Stream)' is a 'method' but is used like a 'type'
This is the line of code that is causing the problem:
XmlConfigurator.Configure(new System.IO.FileInfo(System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location) + @"\LocatorConfig.xml"));
Any help with this would be appreciated. Anto