|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Build Number - how to auto increment?I can't believe I can't find the ansewer to this question anywhere, but so
far I have had no luck searching the forums or the help. I am using VS2008 Professional and can not figure out how to auto-increment the build number. I have built this assembly many times, yet the My.Application.Info.Build property returns 0. What am I missing. VB6 had an auto-increment on the project properties dialog, but I can not find something similiar in VS2008. -- Terry Put a * in place of the number in the project properties, for example
instead of setting the version to 1.0.0.0, set it to 1.0.*.* and that will auto-increment the build & revision numbers each time you compile. -Alex Show quoteHide quote "Terry" <TerryCLa@nospam.nospam> wrote in message news:EA5529E5-FAAC-4C7B-9A62-AC8562EED12A@microsoft.com... >I can't believe I can't find the ansewer to this question anywhere, but so > far I have had no luck searching the forums or the help. I am using > VS2008 > Professional and can not figure out how to auto-increment the build > number. > I have built this assembly many times, yet the My.Application.Info.Build > property returns 0. What am I missing. VB6 had an auto-increment on the > project properties dialog, but I can not find something similiar in > VS2008. > -- > Terry Thanks!
-- Show quoteHide quoteTerry "Alex Clark" wrote: > Put a * in place of the number in the project properties, for example > instead of setting the version to 1.0.0.0, set it to 1.0.*.* and that will > auto-increment the build & revision numbers each time you compile. > > -Alex > > "Terry" <TerryCLa@nospam.nospam> wrote in message > news:EA5529E5-FAAC-4C7B-9A62-AC8562EED12A@microsoft.com... > >I can't believe I can't find the ansewer to this question anywhere, but so > > far I have had no luck searching the forums or the help. I am using > > VS2008 > > Professional and can not figure out how to auto-increment the build > > number. > > I have built this assembly many times, yet the My.Application.Info.Build > > property returns 0. What am I missing. VB6 had an auto-increment on the > > project properties dialog, but I can not find something similiar in > > VS2008. > > -- > > Terry > > > Sorry, I should have tried it before I got back to you. When I attempt to
put the * in the last two boxes, I get an "invalid version format" message. I have tried various combinations and the only one it will accept is 1.0.0.*. I am using VS 2008 if that makes any difference. -- Show quoteHide quoteTerry "Alex Clark" wrote: > Put a * in place of the number in the project properties, for example > instead of setting the version to 1.0.0.0, set it to 1.0.*.* and that will > auto-increment the build & revision numbers each time you compile. > > -Alex > > "Terry" <TerryCLa@nospam.nospam> wrote in message > news:EA5529E5-FAAC-4C7B-9A62-AC8562EED12A@microsoft.com... > >I can't believe I can't find the ansewer to this question anywhere, but so > > far I have had no luck searching the forums or the help. I am using > > VS2008 > > Professional and can not figure out how to auto-increment the build > > number. > > I have built this assembly many times, yet the My.Application.Info.Build > > property returns 0. What am I missing. VB6 had an auto-increment on the > > project properties dialog, but I can not find something similiar in > > VS2008. > > -- > > Terry > > > Alex Clark wrote:
> Put a * in place of the number in the project properties, for example Please note - this doesn't simply /increment/ these values. It > instead of setting the version to 1.0.0.0, set it to 1.0.*.* and that will > auto-increment the build & revision numbers each time you compile. recalculates them according to these rules: http://www.eggheadcafe.com/aspnet_answers/vsnetgeneral/May2006/post26751279.asp > ... you specify an asterisk (*) for the version's build number Also, if you start writing libraries (DLL's) make sure you /only/ update > (e.g. "1.0.*"). This will cause build number to be equal to > the number of days since January 1, 2000 local time, and for > revision to be equal to the number of seconds since midnight > local time, divided by 2. the Assembly/File/Version in this way and *not* the /Assembly/Version. Everything in .Net is implicitly Early Bound, so applications built against [Assembly] Version 1.2.3.4 will not "just work" if you later release the same DLL [Assembly] Version 1.2.3.*5*. Of course, you can use Manifests to handle this, but the /default/ behaviour is for applications to /only/ run against the version they were built with. HTH, Phill W. Terry wrote:
> I can't believe I can't find the ansewer to this question anywhere, but so Although you can use * for parts of the version number, I always wanted > far I have had no luck searching the forums or the help. I am using VS2008 > Professional and can not figure out how to auto-increment the build number. greater control over versioning than this. I wanted to define the initial private built part and have this incremented by 1 each time I built. To do this I adapted a macro which does the job very well. You can find the original macro here: http://www.jmedved.com/default.aspx?page=vbnet_vb6ver&rendering=xhtml&language=en This modifies the AssemblyInfo.vb file (which is normally hidden away inside the 'My Project' folder) so you'll need to set this up as required and ensure that it is editable if under source code control. One of the changes I made to the macro was to get it to update the AssemblyFileVersion attribute instead of the AssemblyVersion attribute. AssemblyFileVersion is the version number that appears in Explorer and when you select Properties for an executable. If you change AssemblyVersion, anything that was referencing your component will fail to bind to the new version, but the AssemblyFileVersion is ignored for this check and can be changed to whatever you want. HTH. -- (O)enone Thanks!
-- Show quoteHide quoteTerry "(O)enone" wrote: > Terry wrote: > > I can't believe I can't find the ansewer to this question anywhere, but so > > far I have had no luck searching the forums or the help. I am using VS2008 > > Professional and can not figure out how to auto-increment the build number. > > Although you can use * for parts of the version number, I always wanted > greater control over versioning than this. I wanted to define the > initial private built part and have this incremented by 1 each time I built. > > To do this I adapted a macro which does the job very well. You can find > the original macro here: > > http://www.jmedved.com/default.aspx?page=vbnet_vb6ver&rendering=xhtml&language=en > > This modifies the AssemblyInfo.vb file (which is normally hidden away > inside the 'My Project' folder) so you'll need to set this up as > required and ensure that it is editable if under source code control. > > One of the changes I made to the macro was to get it to update the > AssemblyFileVersion attribute instead of the AssemblyVersion attribute. > AssemblyFileVersion is the version number that appears in Explorer and > when you select Properties for an executable. If you change > AssemblyVersion, anything that was referencing your component will fail > to bind to the new version, but the AssemblyFileVersion is ignored for > this check and can be changed to whatever you want. > > HTH. > > -- > (O)enone > Sorry, but I have another question. I downloaded the macro, but how do I
'connect' it to the solution build. The documentation I have found talks about building a console app and then calling it. But this does not look like that approach as it is a handler for the BuildStart event. If you don't mind, can you connect the pieces for me? -- Show quoteHide quoteTerry "(O)enone" wrote: > Terry wrote: > > I can't believe I can't find the ansewer to this question anywhere, but so > > far I have had no luck searching the forums or the help. I am using VS2008 > > Professional and can not figure out how to auto-increment the build number. > > Although you can use * for parts of the version number, I always wanted > greater control over versioning than this. I wanted to define the > initial private built part and have this incremented by 1 each time I built. > > To do this I adapted a macro which does the job very well. You can find > the original macro here: > > http://www.jmedved.com/default.aspx?page=vbnet_vb6ver&rendering=xhtml&language=en > > This modifies the AssemblyInfo.vb file (which is normally hidden away > inside the 'My Project' folder) so you'll need to set this up as > required and ensure that it is editable if under source code control. > > One of the changes I made to the macro was to get it to update the > AssemblyFileVersion attribute instead of the AssemblyVersion attribute. > AssemblyFileVersion is the version number that appears in Explorer and > when you select Properties for an executable. If you change > AssemblyVersion, anything that was referencing your component will fail > to bind to the new version, but the AssemblyFileVersion is ignored for > this check and can be changed to whatever you want. > > HTH. > > -- > (O)enone > "Terry" <TerryCLa@nospam.nospam> wrote in message This feature never worked in VB6 anyway as it always needed manual news:EA5529E5-FAAC-4C7B-9A62-AC8562EED12A@microsoft.com... >I can't believe I can't find the ansewer to this question anywhere, but so > far I have had no luck searching the forums or the help. I am using > VS2008 > Professional and can not figure out how to auto-increment the build > number. > I have built this assembly many times, yet the My.Application.Info.Build > property returns 0. What am I missing. VB6 had an auto-increment on the > project properties dialog, but I can not find something similiar in > VS2008. intervention in a team environment. Show quoteHide quote > -- > Terry
Visual Studio 2008 and Classes Inheriting From System.Web.UI.WebControls.Style
Problem with embedded carriage returns trouble reading word documents Good tutorial for working with XML Using function with PChar data type problem reading array data from structure still problems reading word documents... how to know if to close sqlreader Multiple File Select Not Working In Published ClickOnce Application Loading an XML Document? |
|||||||||||||||||||||||