VB6 与 MSBuild 集成

发布于 2024-07-06 16:59:15 字数 497 浏览 4 评论 0原文

因此,对于必须在 Team Build/MSBuild 环境(特别是 Visual Basic 6 应用程序/项目)中集成遗留项目/代码的构建/编译的任何人来说,这是一个问题。

除了编写自定义构建任务(我不反对)之外,是否有人对如何最好地将遗留 VB6 项目的编译和版本控制集成到 MSBuild 构建中提出任何建议?

我知道 CodePlex 上有 FreeToDev msbuild 任务,但它们目前已被撤回。

理想情况下,我希望对代码进行版本控制和编译,并捕获 msbuild 日志的编译输出(尤其是错误)。

我看过有关将此功能封装在自定义任务中的建议,但真的想知道是否有人尝试过其他解决方案(除了执行 shell 命令之外) - 本质上,有人有“更干净”的解决方案吗?

理想情况下,使用执行命令将是最后的手段。

So this is a question for anyone who has had to integrate the building/compilation of legacy projects/code in a Team Build/MSBuild environment - specifically, Visual Basic 6 applications/projects.

Outside of writing a custom build Task (which I am not against) does anyone have any suggestions on how best to integrate compilation and versioning of legacy VB6 projects into MSBuild builds?

I'm aware of the FreeToDev msbuild tasks at CodePlex but they've been withdrawn at the moment.

Ideally I'm looking to version and compile the code as well as capture the compilation output (especially errors) for the msbuild log.

I've seen advice on encapsulating this functionality in a custom task, but really wondered if anyone has tried another solution (aside from executing shell commands) -
In essence, does anyone have a "cleaner" solution?

Ideally, executing commands using would be a last resort..

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

自找没趣 2024-07-13 16:59:15

VB6 任务将于周一返回。 关于版本控制,包中没有明确的 vb 版本控制任务,但是您可以使用 TfsVersion (TaskAction="GetVersion") 和 File (TaskAction="Replace") 任务。 如果您认为创建一个新任务来封装/提供其他功能是有价值的,那么请告诉我,我会将其添加到包中,以造福整个社区。

对于撤回表示歉意,但周一我相信所有人都会理解。

The VB6 task will be back on Monday. With regards to versioning, there is no explicit vb versioning task in the pack, however you could make use of the TfsVersion (TaskAction="GetVersion") and the File (TaskAction="Replace") tasks. If you think there is value in creating a new task to encapsulate / provide other functions, then please let me know and I will add it to the pack for the benefit of the whole community.

Apologies for the withdrawal, but come Monday I'm sure all will understand.

2024-07-13 16:59:15

我每天使用 Nant 构建 VB6 项目。 这确实使用 Nant 执行命令来进行构建(我们构建了 4 个项目作为一个“解决方案”的一部分)。

它还允许您在源代码控制存储库中标记版本、获取最新代码、签入、签出、所有正常要求、编译更新/安装程序将文件复制到所需位置并发送结果的电子邮件。

不过,记录的结果相当少,因为您只能获得 VB6 命令行编译提供的输出。

对于版本控制,我必须编写一个小应用程序来提取已编译的可执行文件的版本号,并将其写入一个文本文件,然后 Nant 可以读取和使用该文本文件(用于标签、文件名等(有点痛苦,但 VB 生成版本号无论如何都不符合要求)。

有关其他非核心任务的帮助,请参阅 NAntContrib - 来自上面的 NAnt 链接。

I am using Nant to build VB6 projects daily. This does resort using the Nant execute command to do the builds (we build 4 projects as part of one "solution").

It also allows you to label versions in your source control repository, get latest code, check in, check out, all the normal requirements, compile the update/setup programs copy the files to required locations and send emails of the results.

The logged results are fairly minimal though as you only get the output provided by a VB6 command line compile.

For versioning, I had to write a small app to extract the version number of my compiled executable and write it to a text file that Nant could then read and use (for labels, file names etc. (A bit of a pain but VB generated version numbers don't comply anyway).

For help with other non-core tasks see NAntContrib - from the NAnt link above.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文