I’m deploying now a WPF c# project and want to put the clickonce version (rather than the assembly or product version) on the screen title.
I used to do it in Win form application in the following way. But it seems that it is not the way in WPF applications. I searched on Google but didn’t find anything. Please help.
if (System.Deployment.Application.ApplicationDeployment.IsNetworkDeployed)
{
ApplicationDeployment ad = ApplicationDeployment.CurrentDeployment;
lblVer.Text = "V" + ad.CurrentVersion.ToString();
}
else
lblVer.Text = "V" + Application.ProductVersion.ToString();
OK,
I found the problem.
I had to add reference to
System.DeploymentThat is why I couldn’t use it. This dll is for winforms also.