i want to display version information on my MDI form text

Below code displays "" it doesnot display rivision no

Me.Text = System.Windows.Forms.Application.ProductVersion

how can i display version revision ?


Try thisMe.Text = "ver " & Me.GetType.Assembly.GetName.Version.ToString

still geving Version

it should have been

You can Try this

Me.Text = String.Format("{0}.{1}.{2}.{3}.{4}", My.Application.Info.Version.Major, My.Application.Info.Version.MajorRevision, My.Application.Info.Version.Minor, My.Application.Info.Version.MinorRevision, My.Application.Info.Version.Revision)

still result is same.
still geving Version

You must have to Change the Assembly version of your project. To do that in Project Properties window, go to Application Tab, Click AssemblyInformation button. Now, in this window change the Assembly version as you desire, then Click ‘Ok’ and save it.
In Assembly Information, there are four textboxes.
1. Major version
2. Minor version
3. Build
4. Revision
I am hopeful using following codification you can get your desired result.

Me.Text = String.Format("{0}.{1}.{2}.{3}", My.Application.Info.Version.Major, My.Application.Info.Version.Minor, My.Application.Info.Version.Build, My.Application.Info.Version.Revision)

its works,i think i will have to change manualy for every publish.


As santanu das describe how to change the assembly information.
then all after you have to add this code in form load event

so when you change assembly version the label will change to that version.

Me.LabelVersion.Text = String.Format("Version {0}", My.Application.Deployment.CurrentVersion.ToString)

when you are adding about form then I find this code, and i use this for my projects.

or you can also use this

me.labelversion.text = My.Application.Info.Version.ToString


me.labelversion.text = System.Windows.Forms.Application.ProductVersion.ToString