Need help to understand why COM is missing in “Reference Manager”

拈花ヽ惹草 提交于 2019-12-08 09:37:54

问题


I don't have much experience with COMs.

I have a project that references 2 COMs AxAXISMEDIACONTROLLib and 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.

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"?


回答1:


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).

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.



来源:https://stackoverflow.com/questions/52412068/need-help-to-understand-why-com-is-missing-in-reference-manager

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!