Addin build error when using registration

94 views
Skip to first unread message

Nam Vũ

unread,
Feb 1, 2023, 2:15:32 AM2/1/23
to Excel-DNA
Hi Excel-DNA team!
I have a problem using the subscription:
If I don't add <Reference Path="ExcelDna.Registration.dll" Pack="true" /> to the .dna file. The addin can build, but if I add it throws an error:
Severity Code Description Project File Line Suppression State
Error Could not load file or assembly 'System.Reflection.Metadata, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
Can anyone help me with this problem?

Govert van Drimmelen

unread,
Feb 1, 2023, 5:47:50 AM2/1/23
to exce...@googlegroups.com

If you use the Registration extension, you need a line like that for the packed add-ins to work correctly.

 

Is this a problem for you?

 

-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/81c61c4d-b702-4963-a2cf-5f0b9fad2debn%40googlegroups.com.

Nam Vũ

unread,
Feb 1, 2023, 6:09:18 AM2/1/23
to Excel-DNA
Thanks for the feedback, this is exactly the bug I'm referring to. When adding a reference to the library, rebuilding the addin, that error will occur
error.png
Vào lúc 17:47:50 UTC+7 ngày Thứ Tư, 1 tháng 2, 2023, Govert van Drimmelen đã viết:

Nam Vũ

unread,
Feb 1, 2023, 6:14:02 AM2/1/23
to Excel-DNA
error_2.png
And this is when I removed it from the .dna file. This dialog box appears, but the features of the Registration are still usable. This dialog box pops up whenever I open Excel

Vào lúc 17:47:50 UTC+7 ngày Thứ Tư, 1 tháng 2, 2023, Govert van Drimmelen đã viết:

If you use the Registration extension, you need a line like that for the packed add-ins to work correctly.

Govert van Drimmelen

unread,
Feb 1, 2023, 6:47:47 AM2/1/23
to exce...@googlegroups.com

If you have an error when you remove it, then I suggest you don’t remove it from the .dna file.

 

-Govert

 

 

From: exce...@googlegroups.com <exce...@googlegroups.com> On Behalf Of Nam Vu
Sent: Wednesday, February 1, 2023 1:14 PM
To: Excel-DNA <exce...@googlegroups.com>
Subject: Re: [ExcelDna] Addin build error when using registration

 

image001.png

Nam Vũ

unread,
Feb 1, 2023, 9:35:15 AM2/1/23
to Excel-DNA
This is part of my project, can you help me and build it?
https://drive.google.com/file/d/1_mZNVlk0_gD-RP07lrtQ2aKU1OwvDBLf/view?usp=sharing

Vào lúc 18:47:47 UTC+7 ngày Thứ Tư, 1 tháng 2, 2023, Govert van Drimmelen đã viết:

Govert van Drimmelen

unread,
Feb 1, 2023, 9:41:22 AM2/1/23
to exce...@googlegroups.com

I downloaded your project, and everything built and worked correctly on my machine.

Nam Vũ

unread,
Feb 1, 2023, 9:50:39 AM2/1/23
to Excel-DNA
I can't understand, why is there an error on my machine, Registration cannot be packed

Vào lúc 21:41:22 UTC+7 ngày Thứ Tư, 1 tháng 2, 2023, Govert van Drimmelen đã viết:

Govert van Drimmelen

unread,
Feb 1, 2023, 9:55:13 AM2/1/23
to exce...@googlegroups.com

Oh I see – you are also using ExcelDna.IntelliSense, and must pack this library too:

 

      <ExternalLibrary Path="97LabforExcel.dll" ExplicitExports="false" ExplicitRegistration="true" LoadFromBytes="true" Pack="true" IncludePdb="false" />

      <Reference Path="ExcelDna.Registration.dll" Pack="true" />

      <Reference Path="ExcelDna.IntelliSense.dll" Pack="true" />

Nam Vũ

unread,
Feb 1, 2023, 10:45:33 PM2/1/23
to Excel-DNA
I reinstalled VS and it ran. I think I have set up VS wrong somewhere so it can't build

Vào lúc 21:55:13 UTC+7 ngày Thứ Tư, 1 tháng 2, 2023, Govert van Drimmelen đã viết:
Reply all
Reply to author
Forward
0 new messages