• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 391
  • Last Modified:

Win App version?


I have this VB.net application and I get the app version from the below line.
It prints out something like Version: 1.0.4301.14402

1) Also how are they coming up with this version number?
My assebly.Info.vb has this line,
<Assembly: AssemblyVersion("1.0.*")>

2) I want to make it 1.1 and next time increment by 1, 1.2, 1.3...etc
How can I do that?.

I remember from my other c# win app, I can set this up from the project property.

  • 2
2 Solutions
Assembly versions are not the same as File versions. If you want 1.1, 1.2... then change


Jacques Bourgeois (James Burger)Commented:
Since you have a * in your AssemblyInfo file, the last 2 digits of the version number are generated automatically.

The third digit (the build version) is a reference to the date. It will be incremented every day.

The last digit (the revision version) is a reference to the time. It increments by a certain value everytime you compile during the day, but resest to 0 at midnight.

The way you set it depends on the version of Visual Studio.

In older versions (2002-2003), you needed to manually edit AssemblyInfo.vb.

In newer versions, you go to the project's properties window, and can set it under the Assembly Information button of the Application tab. The asterisk is no longer permitted.

The one that interests you is usually the Assembly version. The File version is used by some COM application, but many programmers use it internally. Personnaly, it is my daily version for my backups. I increment the build version every day. I use only the first 2 digits (Major and minor versions) of the Assembly version as my deployment version and leave the last 2 digits to 0.

There is no way to automatically increment that I know of. Personnally, I have built a macro that opens the AssemblyVersion and increments the Assembly version once a day.

And sorry, I cannot send you the code. It's quite long because it does a lot of daily tasks on my current projects, all the comments are in French, and I have a few passwords and other personal informations in there. I know by experience that even if you try to remove or change the passwords before sending a complex copy of code, you can forget one.

To retrieve only the first 2 digits for display purposes, I use the following method from a dll that I use in all my applications:
Dim version As Version = System.Reflection.Assembly.GetCallingAssembly.GetName.Version
With version
    Return version.Major.ToString & "." & version.Minor.ToString
End With

Open in new window


Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now