简体   繁体   English

在 Team Build 中,自动构建使用 VB6 库的 C# 应用程序的最佳实践方法是什么?

[英]In Team Build, what's the best-practice way of automatically building a C# app that uses a VB6 library?

In Team Build, what's the best-practice way of automatically building a C# app that uses a VB6 library?在 Team Build 中,自动构建使用 VB6 库的 C# 应用程序的最佳实践方法是什么? both app and VbLib are constantly evolving. app 和 VbLib 都在不断发展。

Currently I've got an msbuild proj that calls VB6 from the command line, builds the lib, the lib's guid changes etc. then we manually generate an interop (via tlib), commit and ref the interop in the c# solution.目前我有一个 msbuild proj,它从命令行调用 VB6,构建 lib,lib 的 guid 更改等。然后我们手动生成互操作(通过 tlib),提交并引用 c# 解决方案中的互操作。

I'd like to automate the tlib bit in my msbuild file, at the moment we think someone turned off binary compatability in the VB6 lib's vbp and at the moment the interop doesn't appear to work when we deploy.我想在我的 msbuild 文件中自动执行 tlib 位,目前我们认为有人关闭了 VB6 lib 的 vbp 中的二进制兼容性,目前在我们部署时互操作似乎不起作用。 Should we even be generating the interop?我们甚至应该生成互操作吗? or should we be checking the vb lib binary into source control (which would have to be done automatically after building on the build server...)或者我们应该将 vb lib 二进制文件检查到源代码管理中(这必须在构建服务器上构建后自动完成......)

Any thoughts or pointers appreciated任何想法或指示表示赞赏

cross post to msdn 交叉发布到 msdn

There isn't really a best practice.没有真正的最佳实践。 In order to include these things you'll need to call a bunch of command line utils, these can be integrated into MsBuild using custom build targets.为了包含这些东西,您需要调用一堆命令行工具,这些工具可以使用自定义构建目标集成到 MsBuild 中。 These targets can amend the constantly changing things.这些目标可以修正不断变化的事物。 I'd try to resolve this completely outside of Team Build and completely inside MsBuild, as it's much easier to influence the build process from there include the .proj file in your solution.我会尝试完全在 Team Build 之外并完全在 MsBuild 内部解决此问题,因为从那里影响构建过程要容易得多,将 .proj 文件包含在您的解决方案中。 Then just reference the solution from Team Build.然后只需参考 Team Build 中的解决方案。

There are existing VB6 tasks that can call the compilation of your VB6 app here: http://msbuildextensionpack.codeplex.com/现有的 VB6 任务可以在此处调用 VB6 应用程序的编译: http : //msbuildextensionpack.codeplex.com/

It's not going to be easy though.但这并不容易。 It's probably a lot easier to make sure the VB6 project doesn't change as much, or have the VB6 project guys provide a managed wrapper as part of their release if that's possible.如果可能的话,确保 VB6 项目不会发生太多变化,或者让 VB6 项目人员提供托管包装器作为他们发布的一部分可能要容易得多。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM