<p>Hi,</p>
<p>I hope that I did not created twice.</p>
<p> </p>
<p>I want to use mono and NLog under OpenSuse.</p>
<p> </p>
<p>First I have created a litle consol application to test NLog.</p>
<p> </p>
<p> class Program</p>
<p> {</p>
<p> private static Logger logger = LogManager.GetCurrentClassLogger();</p>
<p> </p>
<p> static void Main(string[] args)</p>
<p> {</p>
<p> logger.Debug("Test");</p>
<p> }</p>
<p> }</p>
<p> </p>
<p>NLog_config file:</p>
<p> </p>
<p><?xml version="1.0" encoding="utf-8" ?></p>
<p><nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"</p>
<p> internalLogFile="/media/log/Nlog_error.log"</p>
<p> internalLogLevel="Trace"</p>
<p> autoReload="true"></p>
<p> <targets></p>
<p> <target name="OtherLog" xsi:type="File" fileName="/media/log/Other.log" /></p>
<p> </targets></p>
<p> <rules></p>
<p> <logger name="*" minlevel="Trace" writeTo="OtherLog" /></p>
<p> </rules></p>
<p></nlog></p>
<p> </p>
<p>RESULT:</p>
<p> </p>
<p>Missing method .ctor in assembly /media/Debug/NLog.dll, type System.ServiceModel.ServiceContractAttribute</p>
<p>Can't find custom attr constructor image: /media/Debug/NLog.dll mtoken: 0x0a000428</p>
<p>Missing method .ctor in assembly /media/Debug/NLog.dll, type System.ServiceModel.ServiceContractAttribute</p>
<p>Can't find custom attr constructor image: /media/Debug/NLog.dll mtoken: 0x0a000428</p>
<p>Missing method .ctor in assembly /media/Debug/NLog.dll, type System.ServiceModel.ServiceContractAttribute</p>
<p>Can't find custom attr constructor image: /media/Debug/NLog.dll mtoken: 0x0a000428</p>
<p>Missing method .ctor in assembly /media/Debug/NLog.dll, type System.ServiceModel.ServiceContractAttribute</p>
<p>Can't find custom attr constructor image: /media/Debug/NLog.dll mtoken: 0x0a000428</p>
<p>Missing method .ctor in assembly /media/Debug/NLog.dll, type System.ServiceModel.ServiceContractAttribute</p>
<p>Can't find custom attr constructor image: /media/Debug/NLog.dll mtoken: 0x0a000428</p>
<p>Missing method .ctor in assembly /media/Debug/NLog.dll, type System.ServiceModel.ServiceContractAttribute</p>
<p>Can't find custom attr constructor image: /media/Debug/NLog.dll mtoken: 0x0a000428</p>
<p>Missing method .ctor in assembly /media/Debug/NLog.dll, type System.Runtime.Serialization.DataContractAttribute</p>
<p>Can't find custom attr constructor image: /media/Debug/NLog.dll mtoken: 0x0a00042a</p>
<p>Missing method .ctor in assembly /media/Debug/NLog.dll, type System.Runtime.Serialization.DataContractAttribute</p>
<p>Can't find custom attr constructor image: /media/Debug/NLog.dll mtoken: 0x0a00042a</p>
<p>Missing method .ctor in assembly /media/Debug/NLog.dll, type System.Runtime.Serialization.CollectionDataContractAttribute</p>
<p>Can't find custom attr constructor image: /media/Debug/NLog.dll mtoken: 0x0a000434</p>
<p>Missing method .ctor in assembly /media/Debug/NLog.dll, type System.ServiceModel.ServiceContractAttribute</p>
<p>Can't find custom attr constructor image: /media/Debug/NLog.dll mtoken: 0x0a000428</p>
<p> </p>
<p>Unhandled Exception: System.TypeInitializationException: An exception was thrown by the type initializer for TestNlog.Program ---> NLog.NLogConfigurationException: Exception occurred when loading configuration from /media/Debug/NLog.config ---> System.ArgumentException: Target cannot be found: 'File'</p>
<p> at NLog.Config.Factory`2[NLog.Targets.Target,NLog.Targets.TargetAttribute].CreateInstance (System.String name) [0x00000] in <filename unknown>:0</p>
<p> at NLog.Config.XmlLoggingConfiguration.ParseTargetsElement (NLog.Config.NLogXmlElement targetsElement) [0x00000] in <filename unknown>:0</p>
<p> at NLog.Config.XmlLoggingConfiguration.ParseNLogElement (NLog.Config.NLogXmlElement nlogElement, System.String baseDirectory) [0x00000] in <filename unknown>:0</p>
<p> at NLog.Config.XmlLoggingConfiguration.ParseTopLevel (NLog.Config.NLogXmlElement content, System.String baseDirectory) [0x00000] in <filename unknown>:0</p>
<p> at NLog.Config.XmlLoggingConfiguration.Initialize (System.Xml.XmlReader reader, System.String fileName, Boolean ignoreErrors) [0x00000] in <filename unknown>:0</p>
<p> --- End of inner exception stack trace ---</p>
<p> at NLog.Config.XmlLoggingConfiguration.Initialize (System.Xml.XmlReader reader, System.String fileName, Boolean ignoreErrors) [0x00000] in <filename unknown>:0</p>
<p> at NLog.Config.XmlLoggingConfiguration..ctor (System.String fileName) [0x00000] in <filename unknown>:0</p>
<p> at NLog.LogFactory.get_Configuration () [0x00000] in <filename unknown>:0</p>
<p> at NLog.LogFactory.GetLogger (NLog.LoggerCacheKey cacheKey) [0x00000] in <filename unknown>:0</p>
<p> at NLog.LogFactory.GetLogger (System.String name) [0x00000] in <filename unknown>:0</p>
<p> at NLog.LogManager.GetCurrentClassLogger () [0x00000] in <filename unknown>:0</p>
<p> at TestNlog.Program..cctor () [0x00000] in <filename unknown>:0</p>
<p> --- End of inner exception stack trace ---</p>
<p> </p>
<p>The same application works under mono 2.8 event if it never finish.</p>
<p> </p>
<p>Could you help me please.</p>
Comments:
<p>I hope that I did not created twice.</p>
<p> </p>
<p>I want to use mono and NLog under OpenSuse.</p>
<p> </p>
<p>First I have created a litle consol application to test NLog.</p>
<p> </p>
<p> class Program</p>
<p> {</p>
<p> private static Logger logger = LogManager.GetCurrentClassLogger();</p>
<p> </p>
<p> static void Main(string[] args)</p>
<p> {</p>
<p> logger.Debug("Test");</p>
<p> }</p>
<p> }</p>
<p> </p>
<p>NLog_config file:</p>
<p> </p>
<p><?xml version="1.0" encoding="utf-8" ?></p>
<p><nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"</p>
<p> internalLogFile="/media/log/Nlog_error.log"</p>
<p> internalLogLevel="Trace"</p>
<p> autoReload="true"></p>
<p> <targets></p>
<p> <target name="OtherLog" xsi:type="File" fileName="/media/log/Other.log" /></p>
<p> </targets></p>
<p> <rules></p>
<p> <logger name="*" minlevel="Trace" writeTo="OtherLog" /></p>
<p> </rules></p>
<p></nlog></p>
<p> </p>
<p>RESULT:</p>
<p> </p>
<p>Missing method .ctor in assembly /media/Debug/NLog.dll, type System.ServiceModel.ServiceContractAttribute</p>
<p>Can't find custom attr constructor image: /media/Debug/NLog.dll mtoken: 0x0a000428</p>
<p>Missing method .ctor in assembly /media/Debug/NLog.dll, type System.ServiceModel.ServiceContractAttribute</p>
<p>Can't find custom attr constructor image: /media/Debug/NLog.dll mtoken: 0x0a000428</p>
<p>Missing method .ctor in assembly /media/Debug/NLog.dll, type System.ServiceModel.ServiceContractAttribute</p>
<p>Can't find custom attr constructor image: /media/Debug/NLog.dll mtoken: 0x0a000428</p>
<p>Missing method .ctor in assembly /media/Debug/NLog.dll, type System.ServiceModel.ServiceContractAttribute</p>
<p>Can't find custom attr constructor image: /media/Debug/NLog.dll mtoken: 0x0a000428</p>
<p>Missing method .ctor in assembly /media/Debug/NLog.dll, type System.ServiceModel.ServiceContractAttribute</p>
<p>Can't find custom attr constructor image: /media/Debug/NLog.dll mtoken: 0x0a000428</p>
<p>Missing method .ctor in assembly /media/Debug/NLog.dll, type System.ServiceModel.ServiceContractAttribute</p>
<p>Can't find custom attr constructor image: /media/Debug/NLog.dll mtoken: 0x0a000428</p>
<p>Missing method .ctor in assembly /media/Debug/NLog.dll, type System.Runtime.Serialization.DataContractAttribute</p>
<p>Can't find custom attr constructor image: /media/Debug/NLog.dll mtoken: 0x0a00042a</p>
<p>Missing method .ctor in assembly /media/Debug/NLog.dll, type System.Runtime.Serialization.DataContractAttribute</p>
<p>Can't find custom attr constructor image: /media/Debug/NLog.dll mtoken: 0x0a00042a</p>
<p>Missing method .ctor in assembly /media/Debug/NLog.dll, type System.Runtime.Serialization.CollectionDataContractAttribute</p>
<p>Can't find custom attr constructor image: /media/Debug/NLog.dll mtoken: 0x0a000434</p>
<p>Missing method .ctor in assembly /media/Debug/NLog.dll, type System.ServiceModel.ServiceContractAttribute</p>
<p>Can't find custom attr constructor image: /media/Debug/NLog.dll mtoken: 0x0a000428</p>
<p> </p>
<p>Unhandled Exception: System.TypeInitializationException: An exception was thrown by the type initializer for TestNlog.Program ---> NLog.NLogConfigurationException: Exception occurred when loading configuration from /media/Debug/NLog.config ---> System.ArgumentException: Target cannot be found: 'File'</p>
<p> at NLog.Config.Factory`2[NLog.Targets.Target,NLog.Targets.TargetAttribute].CreateInstance (System.String name) [0x00000] in <filename unknown>:0</p>
<p> at NLog.Config.XmlLoggingConfiguration.ParseTargetsElement (NLog.Config.NLogXmlElement targetsElement) [0x00000] in <filename unknown>:0</p>
<p> at NLog.Config.XmlLoggingConfiguration.ParseNLogElement (NLog.Config.NLogXmlElement nlogElement, System.String baseDirectory) [0x00000] in <filename unknown>:0</p>
<p> at NLog.Config.XmlLoggingConfiguration.ParseTopLevel (NLog.Config.NLogXmlElement content, System.String baseDirectory) [0x00000] in <filename unknown>:0</p>
<p> at NLog.Config.XmlLoggingConfiguration.Initialize (System.Xml.XmlReader reader, System.String fileName, Boolean ignoreErrors) [0x00000] in <filename unknown>:0</p>
<p> --- End of inner exception stack trace ---</p>
<p> at NLog.Config.XmlLoggingConfiguration.Initialize (System.Xml.XmlReader reader, System.String fileName, Boolean ignoreErrors) [0x00000] in <filename unknown>:0</p>
<p> at NLog.Config.XmlLoggingConfiguration..ctor (System.String fileName) [0x00000] in <filename unknown>:0</p>
<p> at NLog.LogFactory.get_Configuration () [0x00000] in <filename unknown>:0</p>
<p> at NLog.LogFactory.GetLogger (NLog.LoggerCacheKey cacheKey) [0x00000] in <filename unknown>:0</p>
<p> at NLog.LogFactory.GetLogger (System.String name) [0x00000] in <filename unknown>:0</p>
<p> at NLog.LogManager.GetCurrentClassLogger () [0x00000] in <filename unknown>:0</p>
<p> at TestNlog.Program..cctor () [0x00000] in <filename unknown>:0</p>
<p> --- End of inner exception stack trace ---</p>
<p> </p>
<p>The same application works under mono 2.8 event if it never finish.</p>
<p> </p>
<p>Could you help me please.</p>
Comments:
See comment