Custom action within installer - Could not find MyAction.Installstate
I wanted to run custom action code during the Commit phase of the Setup Project.
I created an installer class and override the Commit method. I also added that installer as a custom action to the Commit phase (View->Custom Actions).
During the installation process I got an exception saying “Could not find C:/Program Files/MyApp/MyAction.Installstate”
The problem is that the MSI infrastructure is looking for the installation state file which is usually created during the Install phase. If the custom action does not participate in the Install phase, no file is created.
The solution is to add the custom action to both the Install and the Commit phases, although it does nothing during the install phase.