如何在visual basic 6.0中进行开发和构建 [英] How to do development and build in visual basic 6.0

查看:31
本文介绍了如何在visual basic 6.0中进行开发和构建的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找构建多个 Visual Basic 项目(所有 dll 的)的最佳实践.我们有多个项目,我们的最终交付物将是一个 dll.现在,一个项目使用另外两个项目,另一个引用另一个项目.项目应该引用 vbp 文件还是 dll?如果他们引用 vbp 文件,如何构建所有项目?

I am looking for best practice in building multiple visual basic projects(all dll's).We have multiple projects, and our final deliverable will be a dll.Now, one project uses 2 other projects, and another refers to another project.Should projects reference the vbp files, or the dll? If they reference vbp files, how to build all the projects?

推荐答案

使用 VB6 几年后,我们的项目结构趋向于这样:

After some years with VB6, our projects tended to be structured like this:

在源文件夹下组织的所有项目源(项目和源).

All project source (project and source) organized under the source folder.

\project\source
\project\source\project1\
\project\source\project2\
...

一个 bin 文件夹中的所有二进制文件(.dll 和 .exe).

All binaries (.dll and .exe) in one bin folder.

\project\bin\

所有 .dll 设置为与单个 bin 目录中的结果文件兼容的二进制文件.

All .dll set as binary compatible with resulting file in the single bin diretory.

在使二进制兼容稳定的初始构建之后,每个非破坏性构建都会使用一个简单的命令文件 build.cmd 来完成,该文件放在源文件夹上方的文件夹中,可能是这样的:

After initial build to make the binarycomptible stable, every non breaking build would be done by using a simple command file build.cmd placed in the folder above the source folder, maybe like this:

"c:\Program Files\Microsoft Visual Studio\VB98\VB6.EXE" /M .\source\project1\proj1.vbp
"c:\Program Files\Microsoft Visual Studio\VB98\VB6.EXE" /M .\source\project2\proj2.vbp
"c:\Program Files\Microsoft Visual Studio\VB98\VB6.EXE" /M .\source\project3\proj3.vbp
del .\\bin\\*.exp
del .\\bin\\*.lib

构建顺序必须是依赖的顺序.

The build order must be in the order of dependance.

每当发生重大更改时,依赖的 VB 项目都必须参考新的二进制文件.

Whenever a breaking change occured, the dependant VB project must be refrenced to the new binary.

在没有破坏性更改的情况下,build.cmd 通常可以完成这项工作.

Without breaking changes, the build.cmd usually did the job.

这篇关于如何在visual basic 6.0中进行开发和构建的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆