Trying to Get Started...A Few Questions

53 views
Skip to first unread message

Tom Baxter

unread,
Sep 16, 2021, 2:53:42 PM9/16/21
to Excel-DNA
Hello,

I am just starting out. I have all the samples cloned. I am trying to customize the name of the generated XLL file. As a test, I modified these lines in ExcelDna.Build.props in the AsyncHelloWorld project with the red changes:

<ExcelDna32BitAddInSuffix Condition="'$(ExcelDna32BitAddInSuffix)' == ''">32</ExcelDna32BitAddInSuffix>

and 

<ExcelDnaPackXllSuffix Condition="'$(ExcelDnaPackXllSuffix)' == ''">-packedSolid</ExcelDnaPackXllSuffix>

The generated XXL file name was not affected -- the suffix remained as "packed" and the 32 bit suffix was missing from the 32-bit XLL file name. What did I do wrong?

Also, on this page,  it indicates, "The Samples\Packing directory has a number of samples of how to use the packing feature", but there is no "Packaging" directory under Samples, as far as I can see.

Also, I need to modify the name of the Add In that is packed, so instead of "AsyncHellowWorld Add-In", it would be something like, "AsyncHelloWorld-DEV". Is this even possible?

Sorry for all the questions. Please just point me in the right direction.

Thanks

Govert van Drimmelen

unread,
Sep 16, 2021, 3:08:18 PM9/16/21
to Excel-DNA
Hi Tom,

I think the changes to the ExcelDna.Build.props only kick in when you restart Visual Studio. This is due to some weirdness in how Visual Studio builds projects. In the worst case you might even have to remove some temporary files, as notes at the top of the  ExcelDna.Build.props file. But for me restarting Visual Studio works fine.

In the olden days (2009), before we starting using the NuGet system, you could do the packing manually by running ExcelDnaPack. To test this I made a bunch of samples that pack different parts of the add-in. Those samples are in the main repository here:  ExcelDna/Distribution/Samples/Packing at master · Excel-DNA/ExcelDna (github.com)

The root name of the add-in (before the bit suffix and pack suffix) comes from the name of the .dna file in your project. You can change the name of this file (keeping the .dna extension) to see how this affects the output.

-Govert

Tom Baxter

unread,
Sep 16, 2021, 4:35:24 PM9/16/21
to Excel-DNA
Thank you, Govert. That was very helpful. I had to restart VS for the changes to take effect and as you mentioned, the name of the .dna file serves as the base name for the generated .xll file.

Additionally, within the .dna file, the Name attribute of the <DnaLibrary> element drives the generated name of the add-in, as seen by Excel.

Is there a description somewhere of all the available elements that can be used in ExcelDna.Build.props and their meanings? I am not a DevOps person so this might be obvious but how do the "variables" (.e.g.,  ExcelDnaPackXllSuffix and  ExcelDna32BitAddInSuffix) get set/changed? if you or someone could just point me in the right direction it would be helpful.

Thank you again.

Tom
Reply all
Reply to author
Forward
0 new messages