Results 1 to 8 of 8

Thread: Application version

  1. #1

    Thread Starter
    New Member
    Join Date
    Jun 2002
    Posts
    8

    Question Application version

    Where can I set the Version (Major, Minor and Private) in VB.NET

    In VB6 it was in the project properties window. Where is it now ?

    Thanks

  2. #2
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    Its in the AssemblyInfo.vb file:

    ' Version information for an assembly consists of the following four values:
    '
    ' Major Version
    ' Minor Version
    ' Build Number
    ' Revision
    '
    ' You can specify all the values or you can default the Build and Revision Numbers
    ' by using the '*' as shown below:

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

  3. #3

  4. #4
    New Member sokkmees's Avatar
    Join Date
    Sep 2002
    Location
    Estonia
    Posts
    11
    It goes like this:

    Code:
    Application.ProductVersion

  5. #5
    Super Moderator Wokawidget's Avatar
    Join Date
    Nov 2001
    Location
    Headingly Occupation: Classified
    Posts
    9,632
    Sorry, should have made my post clearer.

    Version number from ANOTHER exe.

    I have worked it out. It is:
    VB Code:
    1. Imports System.Diagnostics
    2.  
    3. Public Function GetFileVersion(ByVal pstrEXE As String) As String
    4.    Dim myFileVersionInfo As FileVersionInfo = FileVersionInfo.GetVersionInfo(pstrEXE)
    5.    GetFileVersion = myFileVersionInfo.FileVersion
    6. End Function

    Woka

  6. #6
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170
    Originally posted by Wokawidget

    Imports System.Diagnostics


  7. #7
    Super Moderator Wokawidget's Avatar
    Join Date
    Nov 2001
    Location
    Headingly Occupation: Classified
    Posts
    9,632
    Look you stupid frog...shhhhhh.
    If I don't add this imports line then:
    VB Code:
    1. Public Function GetFileVersion(ByVal pstrEXE As String) As String
    2.    Dim myFileVersionInfo As [B]FileVersionInfo[/B] = FileVersionInfo.GetVersionInfo(pstrEXE)
    3.    GetFileVersion = myFileVersionInfo.FileVersion
    4. End Function
    Then FileVersionInfo is unknown and thus .NET whinges about it.
    I suppose I could do:
    VB Code:
    1. Public Function GetFileVersion(ByVal pstrEXE As String) As String
    2.    Dim myFileVersionInfo As System.Diagnostics.FileVersionInfo = System.Diagnostics.FileVersionInfo.GetVersionInfo(pstrEXE)
    3.    GetFileVersion = myFileVersionInfo.FileVersion
    4. End Function
    This is in an ASP.NET web form, and not a VB.NET application. Maybe the imports for this type of .NET project are different.

    *GROWL*

    *EATS FROG*

    *SLAP*

    Woof

  8. #8
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170
    Hey, I didn't say anything! I just grinned at you. An innocent smile.

    Why are you feeling so guilty?

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