Results 1 to 4 of 4

Thread: Getting my applications assembly version number at runtime [resolved]

  1. #1

    Thread Starter
    Frenzied Member Ultimasnake's Avatar
    Join Date
    Feb 2002
    Location
    Amsterdam, holland
    Posts
    1,172

    Getting my applications assembly version number at runtime [resolved]

    Can anybody show me how to get my programs version number (that i set in the assembly) at runtime? i want to display it in a label for users to see :P
    Last edited by Ultimasnake; Nov 10th, 2003 at 05:28 AM.
    For my PC and MS Smartphone 2003 software visit
    http://www.ultimasoftware.nl

  2. #2
    Lively Member
    Join Date
    Jul 2003
    Location
    Kuala Lumpur (Malaysia)
    Posts
    92

    Smile

    System.Windows.Forms.Application.ProductVersion.

  3. #3

    Thread Starter
    Frenzied Member Ultimasnake's Avatar
    Join Date
    Feb 2002
    Location
    Amsterdam, holland
    Posts
    1,172
    thank u.. was looking in assembly :P
    For my PC and MS Smartphone 2003 software visit
    http://www.ultimasoftware.nl

  4. #4
    Fanatic Member VBCrazyCoder's Avatar
    Join Date
    Apr 2003
    Posts
    681
    That won't work with a dll though. You can use this for Dll's and Exe's:

    VB Code:
    1. 'Create the assembly object
    2.             Dim objAssembly As System.Reflection.Assembly = System.Reflection.Assembly.GetExecutingAssembly()
    3.  
    4.             'Get each part of the version through the assembly object
    5.             Return objAssembly.GetName().Version.Major & "." & objAssembly.GetName().Version.Minor & "." & _
    6.                 objAssembly.GetName().Version.Build & "." & objAssembly.GetName().Version.Revision

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width