Hello,
We are developing a VSTO Add-in for Excel (.NET Framework 4.7.2) in C# and we decided to use your library to be able to create User Defined Functions and include them in excel as it were a formula.
We can execute in Excel, debugging code in Visual Studio (2017), the custom functions that we have created and they appear correctly.
The problem we have is when we publish the Add-in and install it, when we run it, we lose the list of functions and Excel can't find them.
We've tried many different things but couldn't get it right.
We even tried to make a direct call to the methods containing the references to your library, and in that case we get the attached error.
I would greatly appreciate the help provided.
All the best.
--------------------------------------------------
Excel-DNA is now registered on GitHub Sponsors.
A small once-off or monthly contribution encourages support and further development.
--------------------------------------------------
You need to establish whether the problem is with running the add-in on the other machine, or with your installation.
If you are distributing the “packed” .xll file, then it might be that you have some dependencies that are not being packed.
If you are distributing as an .xll file, .dna file with loose dependencies, you need to be sure all the pieces are getting installed.
(But the file ExcelDna.Integration.dll need never be distributed, the correct copy that Excel-DNA needs is already embedded in the .xll file.)
I suggest:
-Govert
From: 'IVÁN TORRES SEBATIANES' via Excel-DNA <exce...@googlegroups.com>
Sent: Thursday, February 16, 2023 9:46 AM
To: Excel-DNA <exce...@googlegroups.com>
Subject: [ExcelDna] Error calling all UDFs when application is published
Hello,
We are developing a VSTO Add-in for Excel (.NET Framework 4.7.2) in C# and we decided to use your library to be able to create User Defined Functions and include them in excel as it were a formula.
We can execute in Excel, debugging code in Visual Studio (2017), the custom functions that we have created and they appear correctly.
The problem we have is when we publish the Add-in and install it, when we run it, we lose the list of functions and Excel can't find them.
We've tried many different things but couldn't get it right.
We even tried to make a direct call to the methods containing the references to your library, and in that case we get the attached error.

I would greatly appreciate the help provided.
All the best.
"Este mensaje está dirigido de manera exclusiva a su destinatario y puede contener información privada y confidencial. No lo reenvíe, copie o distribuya a terceros que no deban conocer su contenido. En caso de haberlo recibido por error, rogamos lo notifique al remitente y proceda a su borrado, así como al de cualquier documento que pudiera adjuntarse.
Por favor tenga en cuenta que los correos enviados vía Internet no permiten garantizar la confidencialidad de los mensajes ni su transmisión de forma íntegra.
Las opiniones expresadas en el presente correo pertenecen únicamente al remitente y no representan necesariamente la opinión del Grupo BBVA."
"This message is intended exclusively for the adressee and may contain privileged and confidential information. Please, do not disseminate, copy or distribute it to third parties who should not receive it. In case you have received it by mistake, please inform the sender and delete the message and attachments from your system.
Please keep in mind that e-mails sent by Internet do not allow to guarantee neither the confidentiality or the integrity of the messages sent."
--
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/68310851-158a-4564-9700-2bced04882den%40googlegroups.com.
Hi Ivan,
VSTO and Excel-DNA does not really interoperate.
You can’t make a single add-in which mixes VSTO libraries and Excel-DNA libraries and exposes UDF functions.
UDF functions are exposed from the Excel-DNA .xll add-in only.
The Excel-DNA libraries like ExcelDna.Integration should not be referenced from a VSTO project.
VSTO libraries like Microsoft.Office.Tools.XXXX should not be used from an Excel-DNA project.
However, the normal COM interop libraries in namespaces Microsoft.Office.Interop.Excel etc. are OK to use from Excel-DNA.
The options are thus:
I suppose you are trying the second path, and trying to distribute the Excel-DNA based .xll add-in together with the VSTO add-in in a single installation package. That should work OK, if you are sure all the pieces you need from the Excel-DNA .xll add-in are included in the installation. I have not done this myself, but you will have to find a way to include the outputs from the Excel-DNA project, including the .xll file(s) for 32-bit and 64-bit add-ins, into the VSTO installation package.
My checks were intended to verify that the right bits are arriving at the target machine after installing.
To view this discussion on the web visit https://groups.google.com/d/msgid/exceldna/0b5f0b02-be5f-4335-9a53-d8f0fe8afafan%40googlegroups.com.