[Mono-list] NLog works on .net & mono under windows, doesn't work on mono under linux

ido ido.yehieli at gmail.com
Fri Jan 14 10:51:07 EST 2011

i am using NLog, which seems to work fine on .net 4.0 and mono 2.8.2 under
windows, but when trying to run it under debian stable and the latest mono
from git I get the following error:

[mono 2.8]
@ ./Server.exe 

** (./Server.exe:13771): WARNING **: The following assembly referenced from
could not be loaded:
     Assembly:   System.Messaging    (assemblyref_index=7)
     Public Key: b03f5f7f11d50a3a
The assembly was not found in the Global Assembly Cache, a path listed in
the MONO_PATH environment variable, or in the location of the executing

** (./Server.exe:13771): WARNING **: Could not load file or assembly
'System.Messaging, Version=, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.

A fatal error occured:

System.TypeInitializationException: An exception was thrown by the type
initializer for Logic.Infrastructure --->
NLog.Config.NLogConfigurationException: Exception occured when loading
configuration from
---> System.ArgumentException: Target File not found.
  at NLog.TargetFactory.CreateTarget (System.String name) [0x00000] 
  at NLog.Config.XmlLoggingConfiguration.ConfigureTargetsFromElement
(System.Xml.XmlElement element) [0x00000] 
  at NLog.Config.XmlLoggingConfiguration.ConfigureFromXmlElement
(System.Xml.XmlElement configElement, System.String baseDirectory) [0x00000] 
  at NLog.Config.XmlLoggingConfiguration.ConfigureFromFile (System.String
fileName) [0x00000] 
  at NLog.Config.XmlLoggingConfiguration..ctor (System.String fileName,
Boolean ignoreErrors) [0x00000] --- End of inner exception stack trace ---

  at NLog.Config.XmlLoggingConfiguration..ctor (System.String fileName,
Boolean ignoreErrors) [0x00000] 
  at NLog.Config.XmlLoggingConfiguration..ctor (System.String fileName)
  at NLog.LogFactory.get_Configuration () [0x00000] 
  at NLog.LogFactory.GetLogger (NLog.LoggerCacheKey cacheKey) [0x00000] 
  at NLog.LogFactory.GetLogger (System.String name) [0x00000] 
  at NLog.LogManager.GetCurrentClassLogger () [0x00000] 
  at Logic.Infrastructure..cctor () [0x00000] --- End of inner exception
stack trace ---

  at Server.Server.Main (System.String[] args) [0x00000] 
  at Server.Server.Main (System.String[] args) [0x00000] 

Terminating server.

Any idea what went wrong? MoMa also didn't complain about Server.exe as
compiled by .net & mono under windows (as it both compiles and runs without
issue under mono 2.8.2 under windows).

View this message in context: http://mono.1490590.n4.nabble.com/NLog-works-on-net-mono-under-windows-doesn-t-work-on-mono-under-linux-tp3217898p3217898.html
Sent from the Mono - General mailing list archive at Nabble.com.

More information about the Mono-list mailing list