Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

App Build/Version Numbers

Status
Not open for further replies.

SteveShanks

Programmer
Joined
Nov 28, 2001
Messages
112
Location
GB
Hi

Where can I set the application version/build numbers when compiling for release. I also want to have access to these so I can show them on a login screen.

Equivalent to VB 6 App.Major, App.revision etc

Many Thanks
Steve
 
In the AssemblyInfo.VB edit the following tag

<Assembly: AssemblyVersion("0.6.*")>

the * adds the build and revision numbers, or you can use

<Assembly: AssemblyVersion("0.6.0.1")>

To access this information I use

Dim sAssemlyVersion As String = Trim(System.Reflection.Assembly.GetExecutingAssembly.FullName.Split(",")(1).Replace("Version=", ""))
 
Thanks shatch...spot on

Cheers
Steve
 
Note that if you use 0.6.* that Visual Studio only increments the build and revision number when the solution is closed and reopened so you may sometimes get the same build and revision numbers (unless of course you close VS after each build!).

--------------------------------------------------------------------------------------------------------------------------------------------

Need help finding an answer?

Try the search facility ( or read FAQ222-2244 on how to get better results.
 
Thanks ca8msm! I've been wonder why I kept getting the same version number!

-Rick

----------------------
[banghead]If you're about to post an ASP.Net question,
please don't do it in the VB.Net forum[banghead]

[monkey] I believe in killer coding ninja monkeys.[monkey]
 
Yeah it confused me too!

--------------------------------------------------------------------------------------------------------------------------------------------

Need help finding an answer?

Try the search facility ( or read FAQ222-2244 on how to get better results.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top