Created
January 10, 2017 08:09
-
-
Save deadlydog/17292d3cd5e6f81409025d843184078e to your computer and use it in GitHub Desktop.
Shows how to include part of the ClickOnce version in your application version
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public Version ApplicationVersion = new Version("1.11.2"); | |
private void MainWindow_Loaded(object sender, RoutedEventArgs e) | |
{ | |
// If this is a ClickOnce deployment, append the ClickOnce Revision to the version number (as it gets updated with each publish). | |
if (ApplicationDeployment.IsNetworkDeployed) | |
ApplicationVersion = new Version(ApplicationVersion.Major, ApplicationVersion.Minor, ApplicationVersion.Build, ApplicationDeployment.CurrentDeployment.CurrentVersion.Revision); | |
// Display the Version as part of the window title. | |
wndMainWindow.Title += ApplicationVersion; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
perfectly done