Win App version?

Posted on 2011-10-11
Last Modified: 2013-12-16


I have this 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.

Question by:dkim18
    LVL 83

    Expert Comment

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


    LVL 40

    Accepted Solution

    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

    LVL 83

    Assisted Solution


    Featured Post

    Enabling OSINT in Activity Based Intelligence

    Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

    Join & Write a Comment

    The object model of .Net can be overwhelming at times – so overwhelming that quite trivial tasks often take hours of research. In this case, the task at hand was to populate the datagrid from SQL Server database in Visual Studio 2008 Windows applica…
    More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
    In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor ( If you're interested in additional methods for monitoring bandwidt…

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now