locked
Get published version RRS feed

  • Question

  • Hi,

     

    How can I get the published version of my application?

    I want to show the version number that the user is using, how can I do that?

     

    Thanks

    Monday, June 4, 2007 4:08 PM

Answers

  • Hi,

      

    Please check following code,it will help you to get the version of you application

     

     public static string PublicationVersion
            {
                get
                {
                    if (System.Deployment.Application.ApplicationDeployment.IsNetworkDeployed)
                    {
                        return System.Deployment.Application.ApplicationDeployment.CurrentDeployment.CurrentVersion.ToString();
                    }
                    else
                    {
                        return String.Empty;
                    }
                }
            }

    http://blogs.developpeur.org/coq/archive/2005/12/13/15585.aspx

     

    Hope it helps

    With Regards

    Tuesday, June 5, 2007 9:54 AM

All replies

  • I am using C#.
    Monday, June 4, 2007 4:14 PM
  • Hi,

      

    Please check following code,it will help you to get the version of you application

     

     public static string PublicationVersion
            {
                get
                {
                    if (System.Deployment.Application.ApplicationDeployment.IsNetworkDeployed)
                    {
                        return System.Deployment.Application.ApplicationDeployment.CurrentDeployment.CurrentVersion.ToString();
                    }
                    else
                    {
                        return String.Empty;
                    }
                }
            }

    http://blogs.developpeur.org/coq/archive/2005/12/13/15585.aspx

     

    Hope it helps

    With Regards

    Tuesday, June 5, 2007 9:54 AM