Browse Source

Ignore errors when loading designer assemblies.

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/branches/3.0@5458 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
pull/1/head
Daniel Grunwald 16 years ago
parent
commit
8376fe297a
  1. 9
      src/AddIns/DisplayBindings/FormsDesigner/Project/Src/Services/TypeDiscoveryService.cs
  2. 12
      src/AddIns/DisplayBindings/FormsDesigner/Project/Src/Services/TypeResolutionService.cs

9
src/AddIns/DisplayBindings/FormsDesigner/Project/Src/Services/TypeDiscoveryService.cs

@ -9,6 +9,7 @@ using System; @@ -9,6 +9,7 @@ using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel.Design;
using System.IO;
using System.Reflection;
using ICSharpCode.Core;
@ -48,7 +49,13 @@ namespace ICSharpCode.FormsDesigner.Services @@ -48,7 +49,13 @@ namespace ICSharpCode.FormsDesigner.Services
continue;
}
}
AddDerivedTypes(baseType, asm, types);
try {
AddDerivedTypes(baseType, asm, types);
} catch (FileNotFoundException) {
} catch (FileLoadException) {
} catch (BadImageFormatException) {
// ignore assembly load errors
}
}
LoggingService.Debug("TypeDiscoveryService returns " + types.Count + " types");

12
src/AddIns/DisplayBindings/FormsDesigner/Project/Src/Services/TypeResolutionService.cs

@ -417,9 +417,15 @@ namespace ICSharpCode.FormsDesigner.Services @@ -417,9 +417,15 @@ namespace ICSharpCode.FormsDesigner.Services
if (type == null) {
lock (designerAssemblies) {
foreach (Assembly asm in DesignerAssemblies) {
Type t = asm.GetType(name, false);
if (t != null) {
return t;
try {
Type t = asm.GetType(name, false);
if (t != null) {
return t;
}
} catch (FileNotFoundException) {
} catch (FileLoadException) {
} catch (BadImageFormatException) {
// ignore assembly load errors
}
}
}

Loading…
Cancel
Save