Note: This article applies to WorkflowGen.My 3.1.0 and earlier.
When your custom assembly fails to load the required WorkflowGen.My version, you can catch this event and instruct your assembly to use the local WorkflowGen.My version found in the current WorkflowGen executable \bin
folder.
C# example
-
Add a using directive to
System.Reflection
in your class file. -
Add a delegate to the
AssemblyResolve
event in the constructor of your class.// Constructor of the class MyAssembly public MyAssembly() { AppDomain.CurrentDomain.AssemblyResolve += delegate (object sender, ResolveEventArgs e) { if (e.Name != null && e.Name.StartsWith("WorkflowGen.My")) { return Assembly.Load("WorkflowGen.My"); } else { return null; } }; }