Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

command line build...turn on or off the auto-increment option

35 views
Skip to first unread message

sloan

unread,
Feb 15, 2010, 10:27:09 AM2/15/10
to
C:\Program Files\Microsoft Visual Studio\VB98\VB6.exe /MAKE /OUT
"C:\src\MyApplicationSourceFiles\MyApplication.vbp.log"
"C:\src\MyApplicationSourceFiles\MyApplication.vbp" /outdir
"C:\BuildResults\MyApplication\"

The above is what I have now.

Is there any way from the command line to turn on/off the "auto increment"
option?

My motivation is that........when I do a "Gold Build", I want to increment.
But when I do a non-gold-everyday routine build, I don't want it to auto
increment.


This is actually the one leftover vb6 project that I'm trying to get into
our CI (Continuous Integration) system.........


Currently I have the "auto increment" checked in the project
properties..........so I'm incrementing more than I would like to.

.................

Thanks.


Ralph

unread,
Feb 15, 2010, 1:44:10 PM2/15/10
to

Not that I know of.

I always ignore VB's method and insert version information through VSS (or
other SCCS) keywords.

-ralph


Karl E. Peterson

unread,
Feb 16, 2010, 8:12:07 PM2/16/10
to
sloan wrote:
> Is there any way from the command line to turn on/off the "auto increment"
> option?

No. You'll need to write a little app that edits the VBP prior to
build. (No biggie, right?)

--
.NET: It's About Trust!
http://vfred.mvps.org


Nobody

unread,
Feb 16, 2010, 9:08:39 PM2/16/10
to
"sloan" <sl...@ipass.net> wrote in message
news:eZAeZNlr...@TK2MSFTNGP06.phx.gbl...

> My motivation is that........when I do a "Gold Build", I want to
> increment. But when I do a non-gold-everyday routine build, I don't want
> it to auto increment.

Make a copy of the VBP file without the auto-increment and compile that. You
can delete the original EXE, and add "Beta" to the beta EXE name, so you
don't ship the beta by mistake.

sloan

unread,
Feb 19, 2010, 10:21:34 AM2/19/10
to
Actually, I've started on a Custom MSBuild Task to do something similar now.

It's a crappy file rewrite, replace a string MSBuild Task.
As in:
Read the original file with StreamReader.
Read over it line by line.
Search for certain strings, and replace.
Write out the new file as a .tmp file.
Backup the original source file.
Delete the original source file.
Copy the new file (with the replaced values) as the original file name.


One reason I went down this path is because I found this:

<MSBuild.ExtensionPack.VisualStudio.VB6 TaskAction="Build"
Projects="@(MyProjectToBuild)"/>

Which got me to a kinda MSBuild build version of my vbp project. The Task
above basically is a nice and fancy wrapper for "VB6.EXE /MAKE".
You still gotta install the VB/IDE onto the machine calling the Task.


http://www.lmgtfy.com/?q=%22VB6+Class%22+site%3Awww.msbuildextensionpack.com


NOTE (for future googlers (errrr..........bingers):
If I get anywhere (as-in) my custom task actually works.......then I'll try
to provide a followup post.
If you don't see a followup post, then assume I didn't get anywhere or I
just went with "always increment".
I don't know how much time I'll have to dilly-around with this.


http://www.msbuildextensionpack.com/help/3.5.5.0/html/c68d1d6c-b0bc-c944-e1a2-1ad4f0c28d3c.htm
or here

"Karl E. Peterson" <ka...@exmvps.org> wrote in message
news:O4Bk642r...@TK2MSFTNGP02.phx.gbl...

Karl E. Peterson

unread,
Feb 19, 2010, 2:36:22 PM2/19/10
to

sloan wrote:
> "Karl E. Peterson" <ka...@exmvps.org> wrote...

>> sloan wrote:
>>> Is there any way from the command line to turn on/off the "auto increment"
>>> option?
>>
>> No. You'll need to write a little app that edits the VBP prior to build.
>> (No biggie, right?)
>
> "Blah blah blah" (paraphrasing <g>)

Y'know, for the task at hand, it seems rather simple.

Name "my.vbp" As "my.vbp.bak"
WriteFile Replace(ReadFile("my.vbp.bak"), "AutoIncrementVer=1",
"AutoIncrementVer=0"), "my.vbp"

Where WriteFile and ReadFile simply write a string to, or read a string
from, any given file. No idea what that MSBuild thing is, so maybe you
have a reason for going way overboard? :-)

http://www.lmgtfy.com/?q=ReadFile+WriteFile+%22On+Error+Goto+Hell%22

sloan

unread,
Feb 19, 2010, 3:34:59 PM2/19/10
to
I found your reference:
http://vb.mvps.org/samples/Streams/


Well, writing custom MSBuild Tasks is "my new thing", so I'm stretching my
legs using a legit need.

If someone hadn't already written MSBuild.ExtensionPack.VisualStudio.VB6 ,
then I'd be going simple.

But the end-goal is to get this into a Continuous Integration System. And
my flavor of CI is CruiseControl.NET and most of the build logic via
msbuild.exe.


Thanks Karl......


And I wasn't trying to be a smart butt wiht the LMGTFY, I just think its
funny !


"Karl E. Peterson" <ka...@exmvps.org> wrote in message

news:O2tfTrZs...@TK2MSFTNGP05.phx.gbl...

sloan

unread,
Feb 19, 2010, 5:04:04 PM2/19/10
to

This little trick has ended up being useful in other ways as well...........


<Find>Reference=*\A..\SomeOtherProjectFolder\SomeOtherProject.vbp</Find>

<Replace>Reference=*\G{AAAAAAAA-BBBB-CCCC-DDDD-EEEEEEEEEEEE}#1.0#0#..\MySolutionCompiledFiles\SomeOtherProject.dll#SomeOtherProject</Replace>

I'm able to get the reference being set to a compiled dll (with the correct
GUID) in favor of the "reference another .vbp" setting that developers like
so much.

Aka, with the VB6 "line by line" metadata in the .vbp file, I can swap
in/out just about anything with this little trick.

"Karl E. Peterson" <ka...@exmvps.org> wrote in message

news:O2tfTrZs...@TK2MSFTNGP05.phx.gbl...

Karl E. Peterson

unread,
Feb 19, 2010, 6:39:47 PM2/19/10
to
sloan wrote:
> I found your reference:
> http://vb.mvps.org/samples/Streams/

I've posted those so many times here, I had to finally stick them on
the web. :-)

> Well, writing custom MSBuild Tasks is "my new thing", so I'm stretching my
> legs using a legit need.
>
> If someone hadn't already written MSBuild.ExtensionPack.VisualStudio.VB6 ,
> then I'd be going simple.
>
> But the end-goal is to get this into a Continuous Integration System. And my
> flavor of CI is CruiseControl.NET and most of the build logic via
> msbuild.exe.

Ahhh, I thought there were vague whiffs of Fred in play, here. No
wonder my eyes are glazing over at your posts. ;-)

> And I wasn't trying to be a smart butt wiht the LMGTFY, I just think its
> funny !

It's hilarious. But like all mystical powers, must be used
appropriately. ;-)

Tom Shelton

unread,
Feb 19, 2010, 7:02:36 PM2/19/10
to
On 2010-02-19, Karl E Peterson <ka...@exmvps.org> wrote:
> sloan wrote:
>> I found your reference:
>> http://vb.mvps.org/samples/Streams/
>
> I've posted those so many times here, I had to finally stick them on
> the web. :-)
>
>> Well, writing custom MSBuild Tasks is "my new thing", so I'm stretching my
>> legs using a legit need.
>>
>> If someone hadn't already written MSBuild.ExtensionPack.VisualStudio.VB6 ,
>> then I'd be going simple.
>>
>> But the end-goal is to get this into a Continuous Integration System. And my
>> flavor of CI is CruiseControl.NET and most of the build logic via
>> msbuild.exe.
>
> Ahhh, I thought there were vague whiffs of Fred in play, here. No
> wonder my eyes are glazing over at your posts. ;-)
>

Too bad... CC.NET is a very powerful tool. I use it for CI, custom builds,
etc. And were not building all .net stuff either :)


--
Tom Shelton

Karl E. Peterson

unread,
Feb 19, 2010, 7:44:26 PM2/19/10
to

<eyes rolling>

C. Kevin Provance

unread,
Feb 19, 2010, 8:59:54 PM2/19/10
to
| Too bad... CC.NET is a very powerful tool. I use it for CI, custom
builds,
| etc. And were not building all .net stuff either :)

::sigh::

Any excuse.


Tom Shelton

unread,
Feb 20, 2010, 1:16:46 AM2/20/10
to

What? It is a powerfull tool. It's a CI tool, not a programming language.
It just happens to be written using .net.

--
Tom Shelton

Karl E. Peterson

unread,
Feb 22, 2010, 2:16:29 PM2/22/10
to

Your stammering indicates you think I care? Okay, so I was being
playful with the VFred reference. My eyes always glaze over when it
comes to administrivia, but toss in a dose of the devil's deed and I
just really quit caring in an extreme hurry. It's okay, though, we've
all noted your attempts to save me from myself, here. :-)

0 new messages