I am developing an application with windows CE, NETCF 3.5 I am using NLog2-All-开发者_如何转开发Beta1 for logging, but it is giving error that Error 20 'NLog.LogManager' does not contain a definition for 'GetCurrentClassLogger'. If anyone knows the answer, please let me know I am new to NLog.
I tried with GetLogger("MyClass");
It is throwing an exception
System.TypeInitializationException: The type initializer for 'Screen' threw an exception. ---> System.DllNotFoundException: Unable to load DLL 'coredll.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
You won't get this method to work in Compact Framework because it isn't supported.
http://nlog-project.org/wiki/.NET_logging_API
It’s also possible to use or LogManager.GetCurrentClassLogger() but this feature isn’t supported in Compact Framework configuration, so if you want to support mobile devices you shouldn’t use this syntax. GetCurrentClassLogger is also quite costly because internally it uses the StackTrace class to get the name of the current class.
精彩评论