如何使用 RegAsm for COM Interop 部署 DLL? [英] How can deploy a DLL using RegAsm for COM Interop?

查看:30
本文介绍了如何使用 RegAsm for COM Interop 部署 DLL?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在本地有一个 vb.net dll [DTP_Image.dll]:如果我用 VS 2010 构建,它加载正常:

I have a vb.net dll [DTP_Image.dll] at local : if i build by VS 2010, it load ok:

但是我通过命令在其他 PC 上部署了 dll:

But i deploy dll on a other PCs by command:

"C:\Windows\Microsoft.NET\Framework\v4.0.30319\RegAsm.exe" /codebase "C:\deploydll\DTP_Image.dll"

我在 [工具 -> 中找不到我的 dll参考】Excel VBA.

I can't found my dll in [Tool -> Reference] of Excel VBA.

如何使用 RegAsm for COM Interop 部署 DLL?

How can deploy a DLL using RegAsm for COM Interop?

推荐答案

你必须像这样调用 regasm 来导出类型

You have to export the types by calling regasm like this

regasm.exe {your.dll}/register/codebase/tlb

这篇关于如何使用 RegAsm for COM Interop 部署 DLL?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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