Click here to Skip to main content
15,885,366 members
Please Sign up or sign in to vote.
4.50/5 (2 votes)
See more:
How can I get the publish version that is displayed in project properties under the publish tab and display that value in code?
I have googled this but everything that I am seeing is getting the assembly version of the project which does not match the publish version.
Thank you for any help.
Posted

1 solution

Here it is in VB:
VB
Dim strPublishVersion as String = String.Empty 
If System.Deployment.Application.ApplicationDeployment.IsNetworkDeployed Then
     Dim objAppDeploy As System.Deployment.Application.ApplicationDeployment = System.Deployment.Application.ApplicationDeployment.CurrentDeployment
     strPublishVersion = objAppDeploy.CurrentVersion.ToString
Else
     strPublishVersion = "Not network deployed"
End If
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900