Two add-In using some common .NET assemblies (.dll?Â?Ð?és).

Add-in Express™ Support Service
That's what is more important than anything else

Two add-In using some common .NET assemblies (.dll?Â?Ð?és).
 
Vikash Tripathi




Posts: 4
Joined: 2009-10-02
Hi Experts
I am facing some issue while using two Add-In at same time when these two add-In using some common .NET assemblies (.dll?Â?Ð?és).

I have created two different Excel Add-Ins, say Add-In A and Add-In B, after installing on the system they are getting registered perfectly.

These Two add-In codes have reference of some common Dlll say ?Â?Ð?ìXYZ?Â?Ð?í.
This Dll ?Â?Ð?ìXYZ?Â?Ð?í looks for some files in some specific folder in executing assembly path.

?Â?Ð?ìAddin A?Â?Ð?í and ?Â?Ð?ìAddIn B?Â?Ð?í are having different executing path. (They are installed on different locations in system).

By the way these two add-Ins are sharing the common ribbon panel and having two different buttons for theses two (Button A for Add-In A and button B form Add-In B).

Now when these are loaded in EXCEL, code for calling the common dll is written on Button click.

Now say if I click on Button B to load Add-In B and use the common Dll it works fine and points to correct path (installed location of Add-In B), after that I clicked on A to load Add-In A and use the common Dll (it points to correct path Installed location of Add-In A).

Now if I click on button B again, (which will again use the common Dll), but this time the path referred is of Installed location of Add-In A..!! :oops:
It?Â?Ð?és quite surprising for me, as it was suppose to point to Installed location of Add-In B.

I tried to give common Dll a strong name but it never helped to solve this.

Looking for solution for this, please help.


Thanks in advance
Regards
Vikash :oops:
Posted 02 Oct, 2009 10:28:06 Top
Andrei Smolin


Add-in Express team


Posts: 18810
Joined: 2006-05-11
Hi Vikash,

Is your add-in non-isolated? If so, this explains why you get the issue: when an add-in B looks for the assembly, it finds it already loaded in the AppDomain (it's the default AppDomain) and just uses it.

ards from Belarus (GMT+2),

Andrei Smolin
Add-in Express Team Leader
Posted 05 Oct, 2009 12:18:39 Top
Vikash Tripathi




Posts: 4
Joined: 2009-10-02
No my add-In is not non-isolated.

It is ADX Loader add-In.
Posted 08 Oct, 2009 04:29:45 Top
Andrei Smolin


Add-in Express team


Posts: 18810
Joined: 2006-05-11
Hi Vikash,

Please see at http://www.add-in-express.com/forum/read.php?FID=5&TID=6169 where a similar issue is discussed.


Andrei Smolin
Add-in Express Team Leader
Posted 08 Oct, 2009 04:49:38 Top