[Mono-bugs] [Bug 402182] New: Missing referenced assembly causes FileNotFoundException
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Fri Jun 20 11:24:09 EDT 2008
https://bugzilla.novell.com/show_bug.cgi?id=402182
Summary: Missing referenced assembly causes FileNotFoundException
Product: Mono: Class Libraries
Version: 1.9.0
Platform: Other
OS/Version: Windows Vista
Status: NEW
Severity: Normal
Priority: P5 - None
Component: System
AssignedTo: mono-bugs at lists.ximian.com
ReportedBy: kobruleht2 at hot.ee
QAContact: mono-bugs at lists.ximian.com
Found By: ---
To reproduce:
1. Create application which references to external assembly.
2. Call the following method from main assembly of this application, pass main
assembly as parameter
protected virtual void Parse(Assembly assembly, IDictionary<Type,
IList<Type>> interfaceImplementations)
{
try
{
var assemblyTypes = assembly.GetTypes();
foreach (Type type in assemblyTypes)
{
if (type.IsAbstract)
continue;
foreach (Type i in type.GetInterfaces())
{
if
(i.Assembly.GetCustomAttributes(typeof(DbLinqAttribute), false).Length > 0)
{
IList<Type> types;
if (!interfaceImplementations.TryGetValue(i, out
types))
interfaceImplementations[i] = types = new
List<Type>();
types.Add(type);
}
}
}
}
catch (ReflectionTypeLoadException)
{
}
}
3. Delete this external assembly referenced by application.
4. Run applicaton.
Observed: FileNotFoundException occurs.
Expected:
No exception.
ReflectionTypeLoadException should occur which is catched in code.
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the mono-bugs
mailing list