This has got to be a lamer question:
In my test project I am attempting to configure log4net. The following method call gives the error.
BasicConfigurator.Configure();
"type name expected but method found"
What am I overlooking?
Thanks, Nick
This has got to be a lamer question:
In my test project I am attempting to configure log4net. The following method call gives the error.
BasicConfigurator.Configure();
"type name expected but method found"
What am I overlooking?
Thanks, Nick
Is this a compile time error or runtime error? Do you have a using log4net.Config
statement in your class file? Does it still happen if you change it to reference the full class name?
log4net.Config.BasicConfigurator.Configure();
Yes.. I have this referenced. I tried the fully qualified name. I don't get it. I can see the method in the namespace. Perhaps this is a version issue.
-Nick
I'm not sure if linking to blog entries is verboten...
If you are trying to log NHibernate stuff, here is what I do:
How to show Log4Net info in NUnit (from NHibernate)
I also have a more basic getting started guide here:
Chris,
It's your article that I used. Look at your test project. You are making a call to a method called "Configure". This is the issue. I think I will try a new library just for kicks.
oops.. I was trying to do this in the wrong context. I added the method call to my test project's constructor and we're good.