Exception using nLog

106 views
Skip to first unread message

Anchal Srivastava

unread,
Sep 29, 2014, 2:48:56 AM9/29/14
to nlog-...@googlegroups.com
I'm getting below exception while using nLog, any help would be greatly appreciated.

2014-09-02 09:07:31.5331 ERROR 1 Toolkit.Shell.Services.MainWindowService - System.TypeInitializationException: The type initializer for 'Toolkit.Strategies.Configuration' threw an exception. ---> System.InvalidOperationException: Collection was modified; enumeration operation may not execute.

   at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)

   at System.Collections.Generic.List`1.Enumerator.MoveNextRare()

   at System.Collections.Generic.List`1.Enumerator.MoveNext()

   at NLog.LogFactory.GetTargetsByLevelForLogger(String name, IList`1 rules, TargetWithFilterChain[] targetsByLevel, TargetWithFilterChain[] lastTargetsByLevel) in c:\NLogBuild\src\NLog\LogFactory.cs:line 544

   at NLog.LogFactory.GetConfigurationForLogger(String name, LoggingConfiguration configuration) in c:\NLogBuild\src\NLog\LogFactory.cs:line 597

   at NLog.LogFactory.GetLogger(LoggerCacheKey cacheKey) in c:\NLogBuild\src\NLog\LogFactory.cs:line 712

   at NLog.LogFactory.GetLogger(String name) in c:\NLogBuild\src\NLog\LogFactory.cs:line 330

   at Toolkit.Logging.NLogService.GetLog() in m:\Toolkit_3\5.3.0\Toolkit\Shell\Core\Logging\NLogService.cs:line 111

   at Toolkit.Logging.LogService.GetLog() in m:\Toolkit_3\5.3.0\Toolkit\Shell\Core\Logging\LogService.cs:line 25

   at Toolkit.Strategies.Configuration..cctor() in m:\Toolkit_3\5.3.0\Toolkit\Services\Strategies\Strategies\Configuration.cs:line 20

Kim Christensen

unread,
Sep 29, 2014, 2:53:42 AM9/29/14
to nlog-...@googlegroups.com

Could you post your configuration?

Reply all
Reply to author
Forward
0 new messages