Click to See Complete Forum and Search --> : automatically update Windows form version
daimous
Nov 7th, 2006, 03:56 AM
hi guys! is it posible for me to update the version of my windows form each time I publish it?
vbcode1980
Nov 7th, 2006, 07:34 AM
Can you elaborate on that? What do you mean with 'updating the version of your windows form'?
jmcilhinney
Nov 7th, 2006, 04:13 PM
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.
daimous
Nov 7th, 2006, 06:09 PM
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 Application.ProductVersion.
Buoy
Nov 7th, 2006, 06:28 PM
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.*")]
jmcilhinney
Nov 7th, 2006, 06:29 PM
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.
daimous
Nov 7th, 2006, 06:57 PM
i'll try that buoy and i'll try to look for it jm...Thanks for the inputs guys!
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.