How to debug VS2010 setup project?

后端 未结 2 1009
死守一世寂寞
死守一世寂寞 2021-02-14 09:56

How to debug VS2010 setup project? I tried attaching to msiexec.exe , but it didn\'t help.

相关标签:
2条回答
  • 2021-02-14 10:29

    It appears that I need to halt my managed code so the process will appear in the debug window. It can be done by calling MessageBox.Show. After that the msiexec managed code entry appears in the processes and if I attach to it I will be able to debug my custom actions code.

    0 讨论(0)
  • 2021-02-14 10:50

    I am assuming you want to debug a custom action in the installer. If so having the solution open while running the installer and have this line of code in one of the events.

    System.Diagnostics.Debugger.Launch();

    When prompted say yes to debug the installer and select the instance of Visual Studio with your project already loaded.

    0 讨论(0)
提交回复
热议问题