VB6 - How to automatically break command line compatibility (or msbuild)

We are implementing Team Build and we know that we need to write MSBuild scripts to create our old VB 6 application. It is configured to use binary compatibility and we will interrupt compatibility and we would like our new auto-build process to automatically disable compatibility.

Does anyone know how to do this or if it is possible?

Alternatively, I know that breaking just changes compatibility with No Compatibility, compiling, changing to Binary, and recompiling. If someone knows how to easily change compatibility from the command line, this will also be useful.

+3
source share
4 answers

Regarding the transition from compatibility to no compatibility, I did such things by editing the project file using Unix style tools (sed, awk and / or perl). Do not change the original project file, but instead create a new / temporary project file and build with it. Here is an example:

sed -e "s/CompatibleMode=0/CompatibleMode=2" <myProj.vbp >tmpProj.vbp

You can use this method for other purposes, such as pasting a version number into a project file.

+2
source

The / d option allows you to replace project property values ​​at compile time. Try

VB6 /MAKE c:\Some.vbp /outdir c:\somedir\ /d CompatibleMode="0"
+1
source

:

VB6 /MAKE c:\Some.vbp /outdir c:\somedir\ /d CompatibleMode="0" CompatibleEXE32=""

+1

, - . . vb, ( addin), . vb, VB, vbp DLL. , ref-dll. dll dll , red-dll . , . vb , , vbp. vb script.

BuildRefDll.vbs <my.vbp>
vb6.exe /make <my.vbp>
0

Source: https://habr.com/ru/post/1702387/


All Articles