Function Intellisense Not Displayed When Using External Xml File

59 views
Skip to first unread message

Alexander Rickman

unread,
Jan 15, 2022, 7:53:31 AMJan 15
to Excel-DNA
Hello all, 

First of all, I would like to echo what many before me have said by saying thank you to Govert for developing and maintaining such an awesome tool for the Excel/.NET development community. I hope you know just how much easier you have made the lives of so many developers 

Saying that, I am working on a rather complicated project, but what I thought would be one of the simplest parts of it seems to be tripping me up. The project is centered around exposing a large number of wrapped RTD functions to Excel and to utilize the ExcelDna.Intellisense server to display intellisense for them. 

I have been able to successfully utilize Excel-DNA function attributes to supply the intellisense metadata, but since there will be so many functions (some of which use the same parameter, e.g. pn (part number)) I feel that it would be more DRY and would remove clutter to just use an external xml file as suggested here. I have set up the file as follows: AddIName.intellisense.xml, and I have supplied it with the appropriate meta data (I think)

intellisense.xml.PNG

Below is my .dna file
dnaFile.PNG

Here is the main entry point of the add-in
ThisAddIn.PNG

And below is an example function
Function.PNG

This configuration does not work though, because no intellisense is being displayed, but I am not sure why. Is my setup wrong? Should I be registering the functions explicitly for this to work?

Any guidance would be greatly appreciated. 

Thanks!

Govert van Drimmelen

unread,
Jan 15, 2022, 9:00:52 AMJan 15
to Excel-DNA
--------------------------------------------------
Excel-DNA is now registered on GitHub Sponsors.
Easily set up a small monthly contribution to encourage support and development.
--------------------------------------------------

Can you check the name of the xml file, comparing with the .xll file you are actually loading?

It might be that you have, for 32-bit and 64-bit respectively
* AddInName-AddIn.xll
and 
* AddInName-AddIn64.xll

Then you need the xml file to be called
* AddInName-AddIn.intellisense.xml
and
* AddInName-AddIn64.intellisense.xml

Otherwise it should work fine as you've shown.

-Govert





Alexander Rickman

unread,
Jan 15, 2022, 10:51:20 AMJan 15
to Excel-DNA
Thanks for getting back to me so quickly!

You are correct about the naming convention and I changed the names of the xml files to match. After testing this though, the intellisense is still not being displayed. I reset the build action for the files from "Content" to "None" and it still was not successful. 

Any ideas?

Govert van Drimmelen

unread,
Jan 15, 2022, 11:02:34 AMJan 15
to exce...@googlegroups.com

This example works on my machine:

 

govert/TestIntellisenseExternal (github.com)

 

-Govert




Below is my .dna file



Here is the main entry point of the add-in



And below is an example function


This configuration does not work though, because no intellisense is being displayed, but I am not sure why. Is my setup wrong? Should I be registering the functions explicitly for this to work?

Any guidance would be greatly appreciated. 

 

Thanks!

--
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/8b5727d9-cbea-46f9-a6ca-c09740b22591n%40googlegroups.com.

Alexander Rickman

unread,
Jan 15, 2022, 11:36:57 AMJan 15
to Excel-DNA
Govert,

The only difference between the way your project is configured and mine, is that you have  ExplicitExports="false" in your .dna file, whereas I had ExplicitExports="true". Once I changed it to false, it worked, but doesn't doing this mean I will have to register functions explicitly (using  ExcelDna.Registration) to avoid the side effects of ExplicitExports="false"?

Also, I noticed that I am getting the following error in the output window: "ExcelDna.Integration Warning: 1 : Assembly EXCELDNA.INTELLISENSE.XMLSERIALIZERS could not be loaded from resources."

Govert van Drimmelen

unread,
Jan 15, 2022, 2:09:50 PMJan 15
to Excel-DNA
There are two different flags in the .dna file.
* ExplicitExports="true" means only functions marked with the ExcelFunction attribute are registered.
* ExplicitRegistration="true" means the functions will be registered in code, and not automatically.

If you are using the Registration extension (or otherwise registering the functions yourself), you might need to consider when the IntelliSense server is installed.
Either call IntelliSenseServer.Install() after registering the functions, or call IntelliSenseServer.Reset() after to have it rescan for functions.

So this doesn't quite explain what you're seeing, but it sounds like your project has some more parts.
If you make a project that shows the problematic behaviour, or adapt the sample I made, then I can look again.

-Govert

Alexander Rickman

unread,
Jan 17, 2022, 1:58:01 PMJan 17
to Excel-DNA
Govert, 

Sorry for the late reply. I didn't have the ExcelFunction attribute specified with  ExplicitExports="true". Once I added that, everything worked as expected. I am still seeing the "ExcelDna.Integration Warning: 1 : Assembly EXCELDNA.INTELLISENSE.XMLSERIALIZERS could not be loaded from resources" warning in the debug output, but I am not too concerned about it, b/c it doesn't seem to be affecting anything. If you want though, I can still provide an example project so you can test for yourself, just let me know. 

Thanks!
Reply all
Reply to author
Forward
0 new messages