Reputation: 54421
I need to build an old VB6 application with a version number where the 4th digit is greater than 9999, for example, version 1.2.0.10003
. VB6 won't let you do this; the build fails.
The current workaround is to build version 1.2.0.9999
and then manually edit the file in Visual Studio to insert the correct version. There must be a better way. Is there a command-line tool that allows you to modify the version number fields of an EXE or DLL? Preferably a way that allows you to edit specific version number fields individually.
Upvotes: 4
Views: 20533
Reputation: 12064
There are a number of tools for editing the version info of a windows executable but I don't think you will need them.
Look here are using resource files in vb http://visualbasic.about.com/od/usevb6/a/ResVB6.htm
And here for info on the version resource http://msdn.microsoft.com/en-us/library/aa381058.aspx
And here for info on the microsoft resource compiler http://msdn.microsoft.com/en-us/library/aa381042(VS.85).aspx
With these two you should be able to disable VB's builtin versioning and use whatever version info you want.
Nevermind, VB6 inserts its own version resource as a post build operation with no way to turn it off. Overwriting the version info in the executable is the only solution.
See http://www.darinhiggins.com/?s=%22resource+files%22
Upvotes: 2
Reputation: 1982
I think editbin
might be a better solution (installed with Visual Studio)
Upvotes: 0
Reputation: 287
This console resource editor allows creating a reliable and repeatable process for updating Product Version Information resources during the final stage of the build process from the command prompt.
See specifically the batch manipulation of file version information page for greater details:
Upvotes: 1
Reputation: 20360
ChangeVersion (and others) taken from:
How do I set the version information for an existing .exe, .dll?
Upvotes: 2