bjk68
Posts: 55
Joined: Tue Dec 01, 2009 12:45 pm

Howto: Debug .Net Installer Class Custom Action

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

Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact:  Website

Re: Howto: Debug .Net Installer Class Custom Action

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
Follow us: Twitter - Facebook - YouTube

Return to “Feature Requests”