生成启用了COM-interop的项目,而无需在生成过程中进行注册 [英] Building an COM-interop enabled project without registering it during build
本文介绍了生成启用了COM-interop的项目,而无需在生成过程中进行注册的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在Visual Studio 2010中,我试图构建一个启用COM-interop的C#项目而不在构建过程中对其进行注册,但是我 DO 需要程序集的typelibrary(.tlb)文件,因此我可以从解决方案中的另一个C ++项目导入它.
In Visual Studio 2010, I'm trying to build an COM-interop enabled C# project without registering it during build, but I DO require the assembly's typelibrary (.tlb) file, so I can import it from another C++ project in the solution.
我还没有找到执行此操作的方法-曾经有一个tlbexp.exe工具,但是不推荐使用它,而推荐使用regasm.exe/tlb(与tlbexp.exe不同,它注册了它)./p>
I haven't found a way of doing this - there once upon a time was a tlbexp.exe tool, but it was deprecated in favor of regasm.exe /tlb (which unlike tlbexp.exe, registers it).
推荐答案
tlbexp在VS2010中仍然可用:
tlbexp is still available in VS2010 here:
C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools\TlbExp.exe
这篇关于生成启用了COM-interop的项目,而无需在生成过程中进行注册的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文