Simon Mourier's Avatar
Simon Mourier's blog (1807 answers on StackOverflow) about Microsoft technologies C#, C/C++, .NET, WinRT, WinUI3, AOT, P/Invoke, COM, Interop, DirectX, Direct2D, Windows, ...
  • 🔎︎ Search
  • Categories
  • Archives
  • About Me
  • c#
  • tracing

NLog exception: Collection was modified; enumeration operation may not execute

Jan 4, 2013 See the question and my original answer on StackOverflow

I think you may be using an old version of NLog. Can you check the NLog file src/NLog/Internal/ObjectGraphScanner.cs you rely on (or look into the assembly with a tool such as .NET reflector)?

It should be like what's displayed in green in this bug fix:

BUG 6015: InvalidOperationException (Collection was modified) in call…

  • SmoBlog © 2010-2026 Simon Mourier. All rights reserved.
  • Privacy & Terms