TFS 构建服务器和 COM 引用 - 这有效吗? [英] TFS Build server and COM references - does this work?

查看:22
本文介绍了TFS 构建服务器和 COM 引用 - 这有效吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的开发人员 PC 上,我已经注册了相应的 dll 并引用了它们.(添加参考 -> COM)在 TFS 构建服务器上,这当然会导致错误,因为引用没有在那里注册,将来也不会.

On my Developer PC i have registered the according dll´s and referenced them. (Add reference -> COM) On the TFS build server this of course causes errors since the references are not registered there and wont be in the future.

避免这种情况的最佳方法是什么?

What is the best way to circumvent this?

推荐答案

好吧,答案比人们想象的要简单.只需使用tlbimp.exe"创建一个相应的 intrerop.dll,将其包含在您的项目中,并引用此 dll 而不是 COM 对象.

OK, the answer was more easy than one might think. Just use "tlbimp.exe" to create an according intrerop.dll which you include in your project and reference to this dll instead to the COM objects.

使用 tlbimp.exe 可以节省时间,因为 Visual Studio 会在您引用 COM 对象时自动创建此 dll.但它不会将其上传到 TFS.所以最后我只使用了自动创建的 dll,TFS 构建服务器很高兴.

You may save the time using tlbimp.exe because Visual Studio creates this dll automatically when you reference a COM object. But it does not upload it to TFS. So finally I just used the automatically created dll and the TFS build Server was happy.

可以在ProjectFolderobjx86Development"中找到自动创建的Interop dll

One may find the automatically created Interop dll in: "ProjectFolderobjx86Development"

这篇关于TFS 构建服务器和 COM 引用 - 这有效吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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