10.1 Add in question - can I pull in components from other DLLs?

07-20-2012 07:56 AM
New Contributor
I'm getting started with the 10.x add-in architecture and have made several add-ins - several extensions, toolbar buttons, etc. What I would like to do is make a single "umbrella" add-in that pulled in components from other DLLs. For example, have each extension in its own DLL for ease of development, separation of concerns, etc. and have a separate add-in reference them. I can't get this to work in the Config.esriaddinx file. I saw this thread but didn't help me.

Let's say I have the add-in configured like this
  <AddIn language="CLR4.0" library="MyNamespace.MyAddin.dll" namespace="MyNamespace.MyAddin">
        <Extension id="MyNamespace_MyAddin_LocalExtension" class="LocalExtension" productName="MyProduct" autoLoad="true">
          <Description>Fill in later</Description>
        <Extension id="MyNamespace_MyOtherProj_OtherExtension" class="OtherExtension" productName="MyProduct" autoLoad="true">
          <Description>Fill in later</Description>

This will load LocalExtension no problem since it is in MyNamespace.MyAddin.dll. But I cannot get OtherExtension to load. Note that there is another DLL, MyNamespace.MyOtherProj.dll with extension class at MyNamespace.MyOtherProj.OtherExtension.

Is this possible? If so, what's the right incantation for Config.esriaddinx to get the add-in DLL to reference the extension?

Jim Hanks
0 Kudos
1 Reply
Occasional Contributor
It does not seem to be feasible only by changing the Config.esriaddinx file. This line <... library="MyNamespace.MyAddin.dll" ...> limits the file for searching the extensions.

However, you can load extension from other project by using AddIn.FromID function. Please look into the following help page for details.

-- Add-in coding patterns --
0 Kudos