Code works fine while debugging but the resulting XLL doesn't work.

54 views
Skip to first unread message

Ulrich

unread,
Apr 30, 2021, 3:14:37 AM4/30/21
to Excel-DNA
Hi there,
while debugging my code from visual studio, excel does what it should do, no errors.

After creating an XLL and using excel on it's own (with the XLL, but without Visual Studio), following two errors prevent my add-in from running.

Initialization [Warning] Assembly EXCELDNA.REGISTRATION.VISUALBASIC could not be loaded from resources.

Initialization [Error] DnaLibrary AutoOpen Error : TargetInvocationException - Ein Aufrufziel hat einen Ausnahmefehler verursacht.


I don't know how I could get this up and running.
Any advice for me?
- Ulrich
Ulrich

Govert van Drimmelen

unread,
Apr 30, 2021, 9:56:01 AM4/30/21
to exce...@googlegroups.com
Hi Ulrich,

It looks like there is a missing assembly in your output directory - the one called ExcelDna.Registration.VisualBasic.dll.
I'm guessing this file is in the build output that you are debugging, but not part of the add-in you are deploying.

The related assembly just called ExcelDna.Registration.dll might give you the same problem after this one is sorted out, or might already be set up correctly.

If you are making a single-file packed add-in, you'll also need to add some entries to your project .dna file that look like:
<Reference Path="ExcelDna.Registration.dll" Pack="true" />
<Reference Path="ExcelDna.Registration.VisualBasic.dll" Pack="true" />

-Govert

To encourage further Excel-DNA development please sign up as a GitHub Sponsor.
Reply all
Reply to author
Forward
0 new messages