I already have the following scenario working:
- Assembly
A.exe: Calling WinForms application. - Assembly
B.dll: Class library hard-referenced byA. - Assembly
C.dll: Compiled at run-time and referencesB(classes inherit fromBclasses).
A.exe compiles some code to C.dll at run-time, loads the assembly and invokes ((B.BaseClass) C.DerivedClass).BaseMethod();
If I compile C to disk as a DLL, it picks up B.dll in the same folder. However, I do not want to write C.dll to disk at all.
What approach would be best to achieve this?
I usually do something like this (register the AssemblyResolve somewhere early in your app, such as in Program.cs or App.xaml.cs):