Custom Action - Error 1001: Could not find file myApp.InstallState

后端 未结 8 794
南笙
南笙 2021-02-01 15:22

I have tried to create a custom action for a Visual Studio Installer project to modify the permissions for a config file.

The Installer.cs is as follows:



        
8条回答
  •  余生分开走
    2021-02-01 15:59

    You can find a solution here

    To quote:

    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.

提交回复
热议问题