Hit a breakpoint in a dynamically loaded assembly?

What setting does Visual Studio need in order for it to hit a breakpoint in a dynamically loaded assembly (dll)? The initial dll (which is a WCF service library) delegates to a static factory class and has great breakpoints. I can get to the point of the static factory loading the dll, but after it successfully loads the assembly (dll) to disk, the breakpoints I set in that separate class library project (DLL, I'm trying to debug) don't get hit. In other words, I expect the source code and those debug symbols to be recognized and presented to me in the Active Document window, and I'm ready to start with F9. Instead, the original client of the WCF project reports the state in which the service was invoked and successfully completed. Any help would be appreciated. All of these projects are in the same Visual Studio solution.

string typeInAssembly = "fully.qualified.typeName";

IInterfacedynDll dynDll = null;

Assembly someAssembly = Assembly.LoadFrom(assemblyPath);

Type dynDllType = someAssembly.GetType(typeInAssembly);

dynDll = (IInterfacedynDll)Activator.CreateInstance(dynDllType);

      

+3


source to share





All Articles