I've got a Winforms app and want to display the version number so that we can know if our update scripts are running correctly. Is there a way to get the Publish Version number (as displayed in the Property Pages of the app, Publish tab)?
When I use Reflection.Assembly.GetExecutingAssembly().GetName().Version etc it seems to use the AssemblyVersion number from AssemblyInfo.vb, which isn't the same.
If I use wildcards in the AssemblyInfo.vb it comes out different numbers again.
This should get you the publish version:
ApplicationDeployment.CurrentDeployment.CurrentVersion