需要帮助以了解为什么“参考管理器"中缺少COM. [英] Need help to understand why COM is missing in "Reference Manager"

查看:123
本文介绍了需要帮助以了解为什么“参考管理器"中缺少COM.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对COM没有太多经验.

I don't have much experience with COMs.

我有一个引用2个COM AxAXISMEDIACONTROLLibAXISMEDIACONTROLLib的项目

I have a project that references 2 COMs AxAXISMEDIACONTROLLib and AXISMEDIACONTROLLib

当我手动删除AxAXISMEDIACONTROLLib时,由于它没有显示在其中,所以无法从参考管理器"中将其重新添加回去.唯一的COM是AXISMEDIACONTROLLib.

When I manually delete AxAXISMEDIACONTROLLib I cannot add it back from "Reference Manager" since it's not shown there. The only COM that's there is AXISMEDIACONTROLLib.

如果没有在参考管理器"中显示AxAXISMEDIACONTROLLib的话,有人可以帮助您理解或给出指导吗?

Can someone help to understand or give a direction to how AxAXISMEDIACONTROLLib was added at first place if it's not shown in "Reference Manager"?

推荐答案

添加COM引用时,.NET将为您创建一个Interop包装器.互操作类型可以嵌入到目标程序集中,也可以放在自己的程序集中(AxInterop.AXISMEDIACONTROLLib.dll).

When you add a COM reference, .NET will create an Interop wrapper for you. The interop types can be embedded into the target assembly, or they can be put in their own assembly (AxInterop.AXISMEDIACONTROLLib.dll).

如果在解决方案资源管理器"窗口中选择程序集引用AxAXISMEDIACONTROLLib,然后按F4键查看属性,则很有可能会看到Embed Interop Types属性设置为False.这将导致Copy Local属性变为可编辑状态,并在编译时生成Interop程序集.

If you select the assembly reference AxAXISMEDIACONTROLLib in the Solution Explorer window and press F4 to see the properties, you will most likely see the Embed Interop Types property is set to False. This causes the Copy Local property to become editable and the Interop assembly to be generated on compilation.

这篇关于需要帮助以了解为什么“参考管理器"中缺少COM.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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