From 382a4eaf32eb3e2228e8d83bf8fed6121cb636b4 Mon Sep 17 00:00:00 2001 From: Daniel Grunwald Date: Tue, 7 Feb 2006 20:13:47 +0000 Subject: [PATCH] Fixed build error and Forum-4986. git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@1097 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61 --- .../Project/Src/Services/TypeDiscoveryService.cs | 4 +++- .../Misc/MonoAddIn/Project/Src/MonoGacReferencePanel.cs | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/AddIns/DisplayBindings/FormsDesigner/Project/Src/Services/TypeDiscoveryService.cs b/src/AddIns/DisplayBindings/FormsDesigner/Project/Src/Services/TypeDiscoveryService.cs index adc4f90e26..aca6c79988 100644 --- a/src/AddIns/DisplayBindings/FormsDesigner/Project/Src/Services/TypeDiscoveryService.cs +++ b/src/AddIns/DisplayBindings/FormsDesigner/Project/Src/Services/TypeDiscoveryService.cs @@ -39,7 +39,9 @@ namespace ICSharpCode.FormsDesigner.Services + "excludeGlobalTypes=" + excludeGlobalTypes.ToString()); //seek in all assemblies //allow to work designers like columns editor in datagridview - foreach (Assembly asm in TypeResolutionService.DesignerAssemblies) { + // Searching types can cause additional assemblies to be loaded, so we need to use + // ToArray to prevent an exception if the collection changes. + foreach (Assembly asm in TypeResolutionService.DesignerAssemblies.ToArray()) { AddDerivedTypes(baseType, asm, types); } LoggingService.Debug("TypeDiscoveryService returns " + types.Count + " types"); diff --git a/src/AddIns/Misc/MonoAddIn/Project/Src/MonoGacReferencePanel.cs b/src/AddIns/Misc/MonoAddIn/Project/Src/MonoGacReferencePanel.cs index 77347bf68d..5bdefdb703 100644 --- a/src/AddIns/Misc/MonoAddIn/Project/Src/MonoGacReferencePanel.cs +++ b/src/AddIns/Misc/MonoAddIn/Project/Src/MonoGacReferencePanel.cs @@ -8,6 +8,7 @@ using ICSharpCode.Build.Tasks; using ICSharpCode.SharpDevelop.Gui; using System; +using System.Collections.Generic; using System.Windows.Forms; namespace ICSharpCode.MonoAddIn