在Windows 8.1和Visual Studio 2017上注册.tlb COM文件 [英] Register .tlb COM file on Windows 8.1 and Visual Studio 2017

查看:115
本文介绍了在Windows 8.1和Visual Studio 2017上注册.tlb COM文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我安装了Win 8.1和VS 2017.我需要为我的项目注册一些.tlb文件,系统上没有regtliv12.exe。

I have installed Win 8.1 and VS 2017. I have some .tlb files I need to register for my project and there is not regtliv12.exe anywhere on my system.

我终于在另一台机器上找到了一个,将其复制过来,当我进行tlb注册时,我收到的消息是它成功但我仍然无法在visual studio 2017 com参考列表中找到它。

I finally found one on another machine, copied it over, and when I do the tlb registration, I get the message that it was successful but I still cannot find it in visual studio 2017 com references list.

推荐答案

您好SitzenPlatz,

Hi SitzenPlatz,

感谢您在此发帖。

您可以尝试使用Regasm.exe。当您使用Regasm.exe时 要注册.tlb文件,首先应指定程序集。如下面的链接所示,Regasm.exe的"/ tlb [:typeLibFile]"用于从指定的程序集生成一个类型库,该程序集包含程序集中定义的可访问类型的
定义,而不是注册现有的类型。有关更多信息,请参阅以下链接。

You can try to use Regasm.exe. When you use Regasm.exe  to register the .tlb file, you should first specify the assembly. As below link shows, the "/tlb [:typeLibFile]" of Regasm.exe is used to generate a type library from the specified assembly containing definitions of the accessible types defined within the assembly, not to register an existing one. For more things, please refer to below link.

https://docs.microsoft.com/en-us/dotnet/framework/tools/regasm-exe-assembly-registration-tool#Anchor_1

希望这可以帮到你。


这篇关于在Windows 8.1和Visual Studio 2017上注册.tlb COM文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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