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

后端 未结 8 879
南笙
南笙 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 16:16

    I had this problem when I didn't specify a custom action in my installer project for all four overrides (Install, Uninstall, Commit, and Rollback). As soon as I specified my project output as the custom action for all four, the issue went away.

    The only overrides in my installer class that did anything were Commit and Uninstall; I think that Install was in charge of creating the InstallState file in the first place, and since it was never called the InstallState file was never created.

提交回复
热议问题