问题
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