Could not load ExcelDna.Integration

Skip to first unread message


Jan 7, 2022, 5:49:13 PMJan 7
to Excel-DNA
I had 2 projects in my solution, both of which produced Excel Addin XLL files and both of which wrote to the same output folder. The first project referenced ExcelDna.Integration version 1.1.0 only (no reference to ExcelDna.AddIn) and the second project referenced ExcelDna.Integration 1.1.0 and ExcelDna.AddIn 1.1.1. 

The first project was unused so I removed it from the solution. After I did that, I started getting an exception saying "Could not load file or asesmbly 'ExcelDna.Integration, Version=, Culture=neutral, PublicKeyToken=f225e9659857edbe' or one of its dependencies"' when I ran the excel addin produced by the second project.

I noticed that ExcelDna.Integration.dll does appear in the output folder when the first project is present in the solution, and it disappears when I remove the first project from the solution.

My first idea for a fix was to somehow get the ExcelDna.Integration.dll back into the output folder, but I've been reading about it and it seems like it isn't required there. But then why am I getting that exception?


Govert van Drimmelen

Jan 8, 2022, 1:15:02 AMJan 8

Hi Michele,


You’re right that the file ExcelDna.Integration.dll does not have to be in the output directory.

A version of this is already packed inside the .xll file.


I suggest you uninstall any ExcelDna packages from your project, make sure there are no ExcelDna.* files left under the project folder or its packages folder.

Also check that you then have no reference in your project to some ExcelDna.Integration assembly somewhere else.

Then reinstall the ExcelDna.AddIn package, and everything should be set up correctly.


If that doesn’t work, write back and I can try to think of some more steps to debug the situation.



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
To view this discussion on the web visit

Michele Olsen

Feb 2, 2022, 4:21:58 PMFeb 2
Thank you for your response Govert. I tried what you suggested and I noticed that when I run my XLL via excel it works fine. The error only comes when I am running Program.cs as a stand-alone application. So I’m thinking that in that case, it does need the ExcelDna.Integration in the output directory. I have tried to get it there by setting copyLocal=true but that doesn’t work, I’m guessing because of the code I see in the targets file that explicitly removes that DLL. Is there any way for me to get ExcelDna.Integration into the output directory?

On Jan 8, 2022, at 1:15 AM, Govert van Drimmelen <> wrote:

You received this message because you are subscribed to a topic in the Google Groups "Excel-DNA" group.
To unsubscribe from this topic, visit
To unsubscribe from this group and all its topics, send an email to
To view this discussion on the web visit
Reply all
Reply to author
0 new messages