How to synchronise the publish version to the assembly version in a .NET ClickOnce application?

sylvanaar’s last line looks like the way to go, in my experience; but with the caveat that it is only available to deployed versions of the application. For debugging purposes, you might want something like:

    static internal string GetVersion()
    {
        if (ApplicationDeployment.IsNetworkDeployed)
        {
            return ApplicationDeployment.CurrentDeployment.CurrentVersion.ToString();
        }

        return "Debug";
    }

Leave a Comment