It is required to display in the program which version of the application published in ClickOnce is currently running. Please do not confuse with the application build version.
1 answer
To get the ClickOnce publication version from the application itself, you need to do three things:
Add a link to the project to the System.Deployment.dll library
Connect namespace:
using System.Deployment.Application;Get the version of the installed publication:
if (ApplicationDeployment.IsNetworkDeployed) { Version version = ApplicationDeployment.CurrentDeployment.CurrentVersion; }
|