I know it's been awhile since this issue was posted, but I wanted to follow-up to determine if it is still possible to find an AddIn Extension the "old fashion" way (i.e. via the COM QueryInterface mechanism). The reason I ask is because the "new" way forces me to add a direct reference to the AddIn Extension project/assembly that I want to use, whereas with the "old" way, I only had to add a reference to the project/assembly defining the "interface" that I wanted to use. Several of your own examples show how to do it the "old" way (i.e. the PointsALongLineTool sample):
//get the editor
UID editorUid = new UID();
editorUid.Value = "esriEditor.Editor";
IEditor3 editor = m_application.FindExtensionByCLSID(editorUid) as IEditor3;
So of course, I would like to do something similar with my extension (such as "jm" reqested in the original post):
IExtension ext = ArcMap.Application.FindExtensionByName("myDemoExt");
IDemoExt demoExt = (IDemoExt)ext;
What do I need to do to my Extension class to make this possible? I'm sure it probably involves using the COM interoperable stuff such as ComVisible, Guid, ClassInterface, ProgId, ComRegisterFunction, ComUnregisterFunction, etc. Any help with this would be much appreciated.