How Do I Change a Project's Version in VB.NET?


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 5 of 5

Thread: How Do I Change a Project's Version in VB.NET?

  1. #1
    Howie Goodson Guest

    How Do I Change a Project's Version in VB.NET?


    I'm new to VB.NET and can't for the life of me figure out where to change
    the project's version information. Anyone know?

  2. #2
    Paul Mc Guest

    Re: How Do I Change a Project's Version in VB.NET?


    G'day Howie

    >I'm new to VB.NET and can't for the life of me figure out where to change
    >the project's version information. Anyone know?


    Look in the AssemblyInfo.vb file...

    Cheers,
    Paul

  3. #3
    Howie Goodson Guest

    Re: How Do I Change a Project's Version in VB.NET?


    Perfect! Thanks Paul!
    Seems a bit archaic to have to do this with a text editor though. Probably
    why I spent most of a day trying to figure out how it's done. LOL! I ever
    would have suspected!
    And as far as I can tell there is no way to auto-increment for each build
    like in VB6 (or even alter this information from within the IDE). However,
    it wouldn't be the first time I missed something very obvious. Oh well...
    It won't kill me to do it this way. Thanks again!!

    Hmmm... This gives me an idea. Since it's just a text file, I could write
    a quick program that monitored the date and time of the .suo file of my projects
    (which changes when I Save All) and alter the version information in the
    AssemblyInfo.vb file accordingly based on the last build file's date and
    time. Only thing is I would have to save the project before creating the
    build but I nearly always do this anyway unless I'm just testing something.

    Sorry for the rambling... Just thinking out loud...


    "Paul Mc" <paulmc@nospam.thehub.com.au> wrote:
    >
    >G'day Howie
    >
    >>I'm new to VB.NET and can't for the life of me figure out where to change
    >>the project's version information. Anyone know?

    >
    >Look in the AssemblyInfo.vb file...
    >
    >Cheers,
    >Paul



  4. #4
    Paul Mc Guest

    Re: How Do I Change a Project's Version in VB.NET?


    G'day Howie.

    >And as far as I can tell there is no way to auto-increment for each build
    >like in VB6 (or even alter this information from within the IDE).


    Actually, you can use the * to set an auto-incrementing section of the version.

    For example:

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

    Will increment the version from 1.0.0.530 to 1.0.0.531 when you build etc.

    HTH,
    Cheers,
    Paul

  5. #5
    Howie Goodson Guest

    Re: How Do I Change a Project's Version in VB.NET?


    "Paul Mc" <paulmc@nospam.thehub.com.au> wrote:
    >
    >G'day Howie.
    >
    >>And as far as I can tell there is no way to auto-increment for each build
    >>like in VB6 (or even alter this information from within the IDE).

    >
    >Actually, you can use the * to set an auto-incrementing section of the version.
    >
    >For example:
    >
    ><Assembly: AssemblyVersion("1.0.0.*")>
    >
    >Will increment the version from 1.0.0.530 to 1.0.0.531 when you build etc.
    >
    >HTH,
    >Cheers,
    >Paul


    Thanks Paul. I tried that but it kept giving me crazily large numbers that
    didn't make any sense or nothing at all (0.0.0.0). I also tested it to see
    if it would auto-increment after making changes and rebuilding but it didn't.
    The version stayed the same. Then later I opened the project and clicked
    rebuild with no changes made and it incremented *boggle*. I need to have
    control over and understand the logic behind the version changes. In my mind
    it seems like the version should change every time the project is rebuilt
    with changes made to the code. I was unable to make this happen predictably
    using the *. Also, I don't like the complexity of the default version information.
    I don't want to have to ask a user what version he is using and hear him
    rattle off 10 digits hehe. Something like 1.0 or 1.1 is far easier for me
    to handle. Thanks again for your help!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center