diff --git a/ChangeLog b/ChangeLog index 8eda79b58..ed9c04fc3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-09-12 Zoltan Varga + + * glib/GType.cs (FindTypeInReferences): Put a try-catch around the assembly + loading as failure to load a referenced assembly is not really an error. + 2008-09-12 Mike Gorse * atk/Object.custom, atk/glue/object.c: Support GetIndexInParent. diff --git a/glib/GType.cs b/glib/GType.cs index 1d59da477..5a2001c12 100755 --- a/glib/GType.cs +++ b/glib/GType.cs @@ -166,13 +166,17 @@ namespace GLib { string asm_dir = Path.GetDirectoryName (asm.Location); foreach (AssemblyName ref_name in asm.GetReferencedAssemblies ()) { Assembly ref_asm; - if (File.Exists (Path.Combine (asm_dir, ref_name.Name + ".dll"))) - ref_asm = Assembly.LoadFrom (Path.Combine (asm_dir, ref_name.Name + ".dll")); - else - ref_asm = Assembly.Load (ref_name); - result = FindTypeInReferences (type_name, ref_asm, visited); - if (result != null) - break; + try { + if (File.Exists (Path.Combine (asm_dir, ref_name.Name + ".dll"))) + ref_asm = Assembly.LoadFrom (Path.Combine (asm_dir, ref_name.Name + ".dll")); + else + ref_asm = Assembly.Load (ref_name); + result = FindTypeInReferences (type_name, ref_asm, visited); + if (result != null) + break; + } catch (Exception) { + /* Failure to load a referenced assembly is not an error */ + } } } return result;