I'm using ILRepack to merge $(TargetDir)\*.dll
with $(TargetDir)\Setup.exe
into a subfolder $(TargetDir)\Merged\Setup.exe
. The merge is successful, and Setup.exe
runs, but I'm getting some JIT errors that don't occur during a debug run and I need to... well... debug them.
But when I attach to the process, Visual Studio's Modules window reports that the "Binary was not built with debug information." So I can't load the symbols.
I'm doing this in Debug
configuration, and a .PDB is being generated. But it seems the assembly itself is missing something.
There's this question, but the scenario is different: I'm not using Plugin Replay (I'm also not sure what that is; it appears to be something related to Dynamics 365).
Mine is just plain-ol' generic stuff. No external dependencies or complications. I just need to get at those JIT errors.
Is there a way to get ILRepack to include debug information during the merge, so I can load the .PDB?
It turned that out my own operations were the source of the problem.
I was modifying resources in the merged assembly, which of course was breaking the match between it and its .pdb file.