如何在Windows窗体上显示ClickOnce版本号 [英] How to display ClickOnce Version number on Windows Forms
问题描述
- Intranet - ClickOnce
- Internet - 通过Windows安装程序安装在citrix farm上
我显示ClickOnce版本号,用于点击一次部署的版本 ApplicationDeployment.IsNetworkDeployed
。
if(ApplicationDeployment.IsNetworkDeployed)
return ApplicationDeployment .CurrentDeployment.CurrentVersion;
但是对于非点击应用程序,我不知道如何检索clickonce版本,除非我硬编码程序集信息中的版本号。
是否有自动的方法来检索非点击部署版本的ClickOnce版本号?
不,我不相信有办法。我相信ClickOnce信息来自仅在ClickOnce部署中可用的清单。我认为编码版本号是你最好的选择。
I have a windows forms application that is deployed to two different locations.
- Intranet - ClickOnce
- Internet - Installed on a citrix farm through Windows installer
I display ClickOnce version number for click-once deployed versionApplicationDeployment.IsNetworkDeployed
.
if (ApplicationDeployment.IsNetworkDeployed)
return ApplicationDeployment.CurrentDeployment.CurrentVersion;
But for the non-click application, I am not sure how to retrieve clickonce version unless I hardcode the version number in assembly info.
Is there an automatic way of retrieve ClickOnce version number for non-clickonce deployed version?
No I do not believe that there is a way. I believe the ClickOnce information comes from the manifest which will only be available in a ClickOnce deployment. I think that hard coding the version number is your best option.
这篇关于如何在Windows窗体上显示ClickOnce版本号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!