0 Comments

If you want to start the debugger after installation of you’re product with a Microsoft Visual Studio 2008 setup msi package, use a Installer class and custom actions and then add a Debugger.Break() on the AfterInstall event:

[RunInstaller(true)]
    public partial class ProjectInstaller : Installer
    {
        public ProjectInstaller()
        {
            InitializeComponent();
        }
        /// <summary>
        /// Event fires after installation
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void AfterInstallation(object sender, InstallEventArgs e)
        {
            Debugger.Break();
        }
        /// <summary>
        /// Event fires before uninstallation
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void BeforeUninstallation(object sender, InstallEventArgs e)
        {

        }
    }

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Related Posts