[ACCEPTED]-Debug dynamically loaded assembly in Visual Studio .NET-reflection

Accepted answer
Score: 12

Do you have the PDB files colocated with 2 the DLLs, having been built from the sources 1 in their current locations?

Score: 11

Build the source locally of dynamically 10 loaded assembly and make sure you have the 9 PDB files where the referencing app is running.

This 8 is a common requirement for people wishing 7 to debug the ASP.NET MVC source code. There 6 are some caveats regarding the GAC though.

Another quick 5 (but dirty) way to do is to temporarily 4 add the project for the dynamically loaded 3 assembly to your solution. This is what 2 Steve Sanderson recommends for debugging the ASP.NET MVC framework. Personally 1 I prefer the PDB root.

Score: 1

I know this is a post long time ago, just 4 want to contribute the web case.

If you are 3 doing web project and loading assembly dynamically, If 2 you are using IIS as development server, don't 1 forget to restart Application Pool.

Score: 1

I had the same issue.


  1. Use the same Build folder for all projects in your solution (Right click every project -> properties -> Build -> Output path (I used "..\bin\Debug" for all projects). Have a look on you Configuration. It need to be "Active (Debug)" for all your path changes.
  2. Create a project build always if you changed a single row in you DLL project. Your DLL file has to be exactly the same version, like your C# sources in Visual Studio.

And it works 1 like a charm...

More Related questions