VS2017无法添加对C#项目的引用。 [英] VS2017 fails to add a reference to C# project.

查看:1565
本文介绍了VS2017无法添加对C#项目的引用。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,



我正在尝试添加对C#项目的引用。引用从TLB文件导入。我做"添加参考/浏览"并指定所需的TLB文件。在我点击"确定"后,VS2017向我显示以下消息:"对< file
name>的引用;无法添加。确保该文件可访问,并且它是有效的程序集或COM组件。当我用OleView打开相同的文件时,我可以看到从这个类型库生成的有效IDL。我在这里缺少什么?



有问题的TLB可以在以下链接找到:

Hello,

I am trying to add a reference to a C# project. The reference is imported from a TLB file. I do "Add reference/Browse" and specify the required TLB file. After I hit "OK", VS2017 shows me the following message: "A reference to <file name> could not be added. Make sure that the file is accessible, and that it is a valid assembly or COM component." When I open the same file with OleView, I can see a valid IDL generated from this type library. What am I missing here?

The TLB in question can be found at the link below:

https://1drv.ms/u/s!AkX9Ou21NcEig9FcEVdnTnjXKbVcOg

https://1drv.ms/u/s!AkX9Ou21NcEig9FcEVdnTnjXKbVcOg

推荐答案

一个TLB是一个COM解决方案,它有助于访问COM DLL。它不是集会, 它不是.NET解决方案,也不是.NET项目。
A TLB is a COM solution, which helps to access a COM DLL. it not an assembly,  it's not a .NET solution and it is not a .NET project.


这篇关于VS2017无法添加对C#项目的引用。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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