Results 1 to 4 of 4

Thread: Environment.version

  1. #1

    Thread Starter
    Lively Member
    Join Date
    May 2001
    Posts
    95

    Environment.version

    In my VB6 days I would create a label and everytime I would build a new executable I would change the version manually.

    I understand you can change the AssemblyInfo.vb class
    <Assembly: AssemblyVersion("1.0.*")>
    to change the version.

    However, when I change the version like so
    <Assembly: AssemblyVersion("1.1.4.0")>
    Rebuild my project and then call

    Environment.Version.tostring It does not reflect the change

    Can someone tell me what I am doing wrong, and If I am calling it properly?

    Do I still have to change the AssemblyVersion everytime a want my build to change?

  2. #2
    Frenzied Member
    Join Date
    Oct 2002
    Location
    Gammapolis
    Posts
    1,474
    That's Application.ProductVersion.
    'Heading for the automatic overload'
    Marillion, Brave, The Great Escape, 1994

    'How will WE stand the FIRE TOMORROW?'
    Eloy, Silent Cries and Mighty Echoes, The Vision - Burning, 1979

  3. #3

    Thread Starter
    Lively Member
    Join Date
    May 2001
    Posts
    95
    Thank You. That does indeed give me the value in the Assembly.

    Question. Will this value ever change if I do not change it. i.e. There really is no difference between creating a label and changing the label text or changing the value in the Assembly. You still have to manually change it?

    I thought I heard somewhere that .Net will keep track of your version???

  4. #4
    Frenzied Member
    Join Date
    Oct 2002
    Location
    Gammapolis
    Posts
    1,474
    That minor version numbers change automatically if you have chosen Enebale Incremental Build, in Configuration Properties of your project properties (I am not 100% sure if this is the case). However i dont know how it changes, once used that and sometimes it didn't changed and sometimes changed a lot. There was a thread about this in the past that you may like to read.
    'Heading for the automatic overload'
    Marillion, Brave, The Great Escape, 1994

    'How will WE stand the FIRE TOMORROW?'
    Eloy, Silent Cries and Mighty Echoes, The Vision - Burning, 1979

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