How to display ClickOnce Version number on Windows Forms

.net, c#, clickonce, deployment

Solution

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.

Problem

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 version`ApplicationDeployment.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?

Original source