I am writing a plugin for Visual Studio, I am able to see all the properties of all the references for a project, except for one property.
How can I access the “Embed Interop Types” property of a reference programmatically?
Right now I am using the VSLangProj80.Reference3 class to get the properties, but it does not include the “Embed Interop Types” property.
I have found a reference to a Microsoft internal use enumeration, VsProjReferencePropId100.DISPID_Reference_EmbedInteropTypes, but don’t know how to use it to find the information I am looking for.
After a lot of trial and error I finally got it working. This url pointed me in the right direction.
In short. VsLangProj100.dll does not include a Reference4 interface, the new interface which should contain the EmbedInteropTypes property. The solution is to make the interface yourself. In order to do this you have to know the GUID of the interface, properties, access specifiers and dispatch id’s. You can check this using the OLE/COM Object Viewer.
The interface should look like this and all works fine:
Gr
Martijn B