Hi Matt,
Excel-DNA is designed so that independent add-ins can live side-by-side.
AppDomain isolation is the main way this is achieved, and seems to have worked well so far.
The fact the add-ins do not share an AppDomain is baked into the Excel-DNA architecture in various ways, e.g.
- liberal use of statics without care about the exact assembly identities
- managing AppDomain assembly resolution for implementing packed assemblies
I can't tell how well a version of Excel-DNA would work where everything is loaded into the default AppDomain.
The special case of running in an Excel compute cluster is one where the isolation is assured by the compute cluster host.
I have no knowledge of this feature being used anywhere.
It might be OK in the special case where you have full control over the Excel process and you're sure no other add-ins are loaded.
I would certainly not like to consider removing that AppDomain isolation as a possible change for Excel-DNA at this stage.
For sharing data between the AppDomains you might consider the standard remoting mechanism, or something like a hidden UDF that can be called from one side to the other, to get access to the shared memory items.
I'm not sure whether these are reasonable options in your environment.
-Govert