NLog/NLog — pull request #442 by tsconn23 (2014-11-14 02:24:16+00:00)
Title: BUG FIX: Modification to LogEventInfo.Properties While Iterating

I modified the loop here to use the keys of the logEventParameter.Properties collection instead of the collection itself. Modifying a collection while iterating over it causes an error. In addition, as you can see, the previous version removed the item according to its key and then tried to add it back. This was obviously not the intent.

Using LogEventInfo.Properties["myKey"] = Value when logging a message is broken in all use cases right now until this change is applied. That's how I found this.