Debug you’re Microsoft Visual Studio 2008 setup project output msi with Debugger.break()
September 22, 2009
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) { } }Tags: C#, Setup Packages