Results 1 to 7 of 7

Thread: automatically update Windows form version

  1. #1

    Thread Starter
    Fanatic Member daimous's Avatar
    Join Date
    Aug 2005
    Posts
    657

    automatically update Windows form version

    hi guys! is it posible for me to update the version of my windows form each time I publish it?

  2. #2
    Hyperactive Member vbcode1980's Avatar
    Join Date
    Nov 2005
    Location
    Anywhere the wind blows
    Posts
    365

    Re: automatically update Windows form version

    Can you elaborate on that? What do you mean with 'updating the version of your windows form'?
    I code C#....

  3. #3
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: automatically update Windows form version

    Do you actually mean "publish", as in create a ClickOnce installer? If so then there's an option to increment the revision number on the Publish tab of the project properties and it's checked by default. If you mean something else then you'd need to specify, and also be careful about using terms that have specific meaning without clarification.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  4. #4

    Thread Starter
    Fanatic Member daimous's Avatar
    Join Date
    Aug 2005
    Posts
    657

    Re: automatically update Windows form version

    Sorry for that.. becuase im on a hurry when i post that question. anyway, what I mean of that is the product version of my Windows form and not the version of the publish, the one that being return by
    Code:
    Application.ProductVersion
    .
    Last edited by daimous; Nov 7th, 2006 at 07:12 PM.

  5. #5
    Lively Member
    Join Date
    Oct 2006
    Posts
    71

    Re: automatically update Windows form version

    It's stored in the AssemblyInfo file. By default it's 1.0.0.0, but you can put asterisks in there to have it automatically updated, e.g. [assembly: AssemblyVersion("1.0.0.*")]

  6. #6
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: automatically update Windows form version

    I've seen several posts explain how to set the assembly version programmatically, although I can't remember how to do it exactly. It would involve a VS macro or some other form of VS extension I would assume. Note also that Setup projects allow you to specify prebuild actions, one of which could be incrmenting the version number, while ClickOnce publishing doesn't as far as I'm aware. That means that you'd have to invoke your macro manually from the tool bar or menu system before publishing.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  7. #7

    Thread Starter
    Fanatic Member daimous's Avatar
    Join Date
    Aug 2005
    Posts
    657

    Re: automatically update Windows form version

    i'll try that buoy and i'll try to look for it jm...Thanks for the inputs guys!

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