Could not load ExcelDna.Integration

51 views
Skip to first unread message

Michele

unread,
Jan 7, 2022, 5:49:13 PMJan 7
to Excel-DNA
Hi,
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=1.1.0.0, 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?

Thanks,
Michele

Govert van Drimmelen

unread,
Jan 8, 2022, 1:15:02 AMJan 8
to exce...@googlegroups.com

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.

 

-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/0d97fcf4-c4e8-473c-8baa-bf8b32ee38e0n%40googlegroups.com.

Michele Olsen

unread,
Feb 2, 2022, 4:21:58 PMFeb 2
to exce...@googlegroups.com
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 <govert.va...@gmail.com> 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 https://groups.google.com/d/topic/exceldna/ZNAZrSPJru0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to exceldna+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/exceldna/023701d80457%240f065a10%242d130e30%24%40gmail.com.
Reply all
Reply to author
Forward
0 new messages