I load a type from a loaded assembly. It wroked for few month, but now (I do not change anything in this method), it crashes the execution if I run my project in VS. No exceptions, no messages, juste a crash...
If I run it from outside, with the ".exe", everything works fine.
If I put a spy on it, I get a "This expression has side effects and will not be executed" (traduced from french).
I do not know what to do, please help ... :(
String dllFilename = Path.Combine(connectorPath, Name + ".dll");
assembly = Assembly.LoadFrom(dllFilename);
type = assembly.GetTypes().FirstOrDefault(
t => t.IsPublic && t.IsClass && !t.IsAbstract && (t.GetInterfaces().Contains(typeof(IOcrHandler))));
if (type == null)
throw new Exception("Error while loading OCR Engine '" + Name + "': impossible to find a main class.");
View Complete Post