When debugging a profiled plugin, internally a method of the Plugin Profiler is called:
The code looks like this:
foreach (KeyValuePair<Relationship, EntityCollection> relatedEntity in value.RelatedEntities)
EntityCollection value3 = ConvertToEarlyBound(relatedEntity.Value);
entity.RelatedEntities[relatedEntity.Key] = value3;
"value" seems to equal "entity".
I guess the error is thrown because the collection that is enumarated on is modified in the loop. Since this is the PluginProfiler.dll, I can't change the code. What can I do?