Unable to debug a C# custom action - Advanced Installer Community
ThomasE
Posts: 6
Joined: Sat Sep 29, 2012 7:54 am

Unable to debug a C# custom action

I would like debug a custom action (written in C#) as described here:
http://www.advancedinstaller.com/user-g ... et-ca.html

unfortunately when I try to connect to the process that raises the messagebox gives me the information: "The following module was built either with optimizations enabled or without debug information. ... "
BUT: I built the custom action DLL as DEBUG and optimizations are turned off. I found out that the TEMP folder that is given in the error message doesn't contain a PDB file for my custom action dll.

Any idea what could be the problem?
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Unable to debug a C# custom action

Hi Thomas,

The PBD file must be next to your DLL in order for you to debug it. Can you please place it there and try again?

Best regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
ThomasE
Posts: 6
Joined: Sat Sep 29, 2012 7:54 am

Re: Unable to debug a C# custom action

Hi,
I just sent you an email but I want to clarify here what I'm doing and what's the problem for me:

1. In my setup wizard a click a button that calls a custom action from a C# dll
2. The custom action opens a messagebox
3. In Visual Studio I would like to attach the debugger to the process of the messagebox. BUT this is not possible because the DLL of the custom action doesn't find the PDB file. The PDB file is not available in the TEMP directory where the setup exctracts the DLL of the custom action.

Any idea how I can add the PDB file to the setup so that it's in the same directory as the DLL when the custom action is executed?

Return to “Common Problems”