How to display ClickOnce Version number on Windows Forms

后端 未结 9 846
眼角桃花
眼角桃花 2020-12-23 11:32

I have a windows forms application that is deployed to two different locations.

  • Intranet - ClickOnce
  • Internet - Installed on a citrix farm through Win
9条回答
  •  [愿得一人]
    2020-12-23 11:55

    Try thread verification:

    if (ApplicationDeployment.IsNetworkDeployed)
    {
        if (ApplicationDeployment.CurrentDeployment.CurrentVersion != ApplicationDeployment.CurrentDeployment.UpdatedVersion)
        {
            Application.ExitThread();
            Application.Restart();
        }
    }
    

提交回复
热议问题