0

I want to be able to have a solution where

  1. Project A does NOT reference project B
  2. I hit build all building both project A and project B
  3. Project A is run and dynamically loads the DLL built in 2. via Assembly.Load
  4. There is a breakpoint in project B in which the IL associated with it gets run

Is this possible?

Nick
  • 920
  • 1
  • 7
  • 21
  • Use solution with 2 projects, where A depends on B (so they both gets build) and A is not referencing B. You may need [some post-build events](https://stackoverflow.com/q/11001822/1997232). – Sinatr May 04 '21 at 13:11
  • Does this answer your question? [How to debug external class library projects in visual studio?](https://stackoverflow.com/questions/654696/how-to-debug-external-class-library-projects-in-visual-studio) – Sinatr May 04 '21 at 13:11

1 Answers1

1

Sure, this should be possible. You probably need some post-build script to move the projectB-dll and all dependencies to the build folder of project A, or some configuration to specify where the dll should be loaded from.

I'm not sure what you are referring to with your last point, but I would not expect the debugger to have any problems locating the debug symbols or corresponding source code in this case. If you are moving the dlls files you should probably also move the corresponding pdb files to ensure they can be loaded correctly.

JonasH
  • 28,608
  • 2
  • 10
  • 23