I'm having a problem trying to get the publish version of my application, I searched and found the following answer in SOEN how to show publish version in a textbox?
I followed exactly the concept of the right answer, but an exception is thrown when trying to get the version of the application.
Version CurrentVersion = ApplicationDeployment.CurrentDeployment.CurrentVersion;
String version = CurrentVersion.Major.ToString() + "." + CurrentVersion.Minor.ToString() + "." + CurrentVersion.Build.ToString() + "." + CurrentVersion.Revision.ToString();