Code excerpt:
var a = Assembly.LoadFile("MyAssembly.dll");
var t = a.GetType("MyNamespace.MyClass", false);
Debug.Assert(t != null); // fails
Assembly.LoadFile() is loading the assembly without any trouble, but Assembly.GetType() is returning null, even though I have verified that MyNamespace.MyClass is present and correctly spelled.
Any other ideas why this is happening?
In the line
set that boolean to
trueso you get an exception that could explain the problem. For various problem situations you get separate exceptions, see MSDN or the new docs.