Howto: Debug .Net Installer Class Custom Action

Request new features that you would like to see in the next version of Advanced Installer.

Howto: Debug .Net Installer Class Custom Action

Postby bjk68 » Mon Dec 27, 2010 4:19 pm

Please add the following to the AdvancedInstaller documentation:

A relatively easy way to debug the Install or Uninstall method called at the Predefined Custom Action ".Net Installer Class Action" is by adding the following lines to your sourcecode:

Code: Select all
using System.Diagnostics;
using System.Reflection;
using System.Windows;

#if DEBUG
         string version = this.GetType().Assembly.GetName().Version.ToString();
         int processId = Process.GetCurrentProcess().Id;
         string message = string.Format("This is assembly version [{0}]. Please attach the debugger to process [{1}].", version, processId);
         MessageBox.Show(message, "Debug", MessageBoxButton.OK, MessageBoxImage.Information, MessageBoxResult.OK);
#endif

Add the following references: PresentationCore, PresentationFramework, WindowsBase
bjk68
 
Posts: 54
Joined: Tue Dec 01, 2009 12:45 pm

Re: Howto: Debug .Net Installer Class Custom Action

Postby Cosmin » Tue Dec 28, 2010 8:39 am

Hi,

We will add it in the next Advanced Installer version. Thank you for your suggestion.

Regards,
Cosmin
Cosmin Pirvu
Advanced Installer Team
http://www.advancedinstaller.com/
Cosmin
 
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm


Return to Feature Requests

Who is online

Users browsing this forum: No registered users and 0 guests