How do I detect the first time a ClickOnce-deployed application has been run?

后端 未结 3 1833
温柔的废话
温柔的废话 2020-12-10 06:16

I have a ClickOnce-deployed application and I\'m currently using this to detect the first time a new deployment is being run:

if (ApplicationDeployment.IsNet         


        
3条回答
  •  感动是毒
    2020-12-10 06:44

    Include an extra file in your ClickOnce install called justInstalled.txt (or something). Chedk for that file when the app starts. If you find it delete it and run any code for your first run of that deployment. The file will stay missing until the next deployment/upgrade.

提交回复
热议问题