.NET 6.0 add-in load failure

200 views
Skip to first unread message

Paul Griffin

unread,
Jun 20, 2023, 6:50:35 AM6/20/23
to Excel-DNA

Hi Govert and team!

Would really appreciate some advice on the below! 

I am having issues launching an Excel DNA add-in which has been built in .NET 6.0. I am seeing the below error message when opening the add-in in Excel. This occurs when debugging in Excel via Visual Studio, and when opening the .xll build file in Excel.

ExcelDNAError1.png

On another machine setup I've seen a slight variation of this error message.

ExcelDNAError2.png

Note I have no issue running Excel DNA add-ins build in .NET Framework 4.8.

I note a discussion relating to a similar error in the forum page here: Error window is shown when trying to register a second add-in · Issue #436 · Excel-DNA/ExcelDna · GitHub

Initially I did have multiple Excel DNA add-ins installed (similar to the issue described on the linked forum page), but removing them did not resolve my issue. I also updates to the latest pre-release version and no change (v1.7.0-rc5).

Any help would be greatly appreciated. Also guidance on how to debug this myself from the source code would be appreciated.

Thanks

Paul

Paul Griffin

unread,
Jun 22, 2023, 3:47:27 AM6/22/23
to Excel-DNA
The issue was an antivirus one. Zipped .dlls in the Excel DNA package were being deleted upon unzipping when the add-in is loaded in Excel. Found a work around for this which involves keeping unpacked copies of the .dlls in the same directory as the packed .xll add-in file. 

.dlls in question were:

ExcelDna.Loader.dll

ExcelDna.Integration.dll

ExcelDna.ManagedHost.dll


These can be unpacked with the property:  <ExcelDnaUnpack>true</ExcelDnaUnpack

Reply all
Reply to author
Forward
0 new messages