Hi Giovanni,
You seem to be mixing a VSTO add-in (ThisAddIn etc.) and an Excel-DNA add-in into the same library.
This does not work well.
What is possibly happening in this case is that your code is loaded as a VSTO add-in into one AppDomain, and running code like ThisAddIn_Startup.
Then the code is loaded a second time as an Excel-DNA add-in, into a different AppDomain, and your functions registered and run in this AppDomain.
Shared objects are not ‘shared’ between AppDomains.
My suggestion is to neve mix VSTO (anything Microsoft.Office.Tools.*) and Excel-DNA in this same project.
Nearly all functionality from VSTO is available from the Excel-DNA add-in, though sometimes you have to do a little bit more work.
Is there a specific reason you are making this a VSTO add-in?
-Govert
--
You received this message because you are subscribed to the Google Groups "Excel-DNA" group.
To unsubscribe from this group and stop receiving emails from it, send an email to exceldna+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/exceldna/8e19272b-05ba-4514-9353-93035bd68651n%40googlegroups.com.