Missing Dlls in Packed xll

119 views
Skip to first unread message

Justin Buchanan

unread,
Oct 31, 2022, 1:43:06 PM10/31/22
to Excel-DNA
If I build local in VS both Debug and Release; everything's fine; all DLLs specified are located and packed. Addin works in Excel fine.

I commited and pushed to our CI build and the packed Dll was coming back about 30% smaller. I used ExcelDnaUnpack to determine it's all the internally built Dlls that are missing. All the external Dlls (some nuget references, some core framework) do get packed as specified. I'm upgrading the packge first time in a long time and it was missing one nuget referenced dll - adding it to the Dna added it to the output correctly, as expected).

If I build from the same MsBuild command line that gets used in CI according to the build output I can see all the Dlls get built and are present in the expected location, alongside the xll and dna. I've added an extra copy to the CI build to capture the state of the files in the xll/dna folder and they're all present, the dna definitition is up-to-date but the ExcelDnaPack takes a long time to execute (over a minute minutes vs the 2s when running local in VS - I guess because it's failing to find the DLLs specified - but why; they're definitely colocated correctly). Everything looks the same as the output I get when I build local; but the CI build Xll-packed is missing a load  of Dlls.

What we had before this long overdue upgrade was a scriptthe automated ExcelDnaPack; but I've replaced all that with ExcelDna.Addin and everything works great local; it's the CI build that's causing issues. I've not added in the ExcelDnaPack nuget because it's a version behind; and AddIn seems to be doing everything  including the pack. Is this assumption correct?
Any suggestions where I should go looking next?
I can see from posts over the years I share the frustration that there's precious little logging to explain when the pack process starts going wrong/skipping files. I'm tempted to go under the hood to add logging; even a pointer within the code to start with would be helpful.

Govert van Drimmelen

unread,
Oct 31, 2022, 3:41:38 PM10/31/22
to exce...@googlegroups.com

--------------------------------------------------

Excel-DNA is now registered on GitHub Sponsors.

When you sign up for a monthly contribution, it encourages further development and support.

--------------------------------------------------

 

Hi Justin,

 

You are right that the packing is now run as a build task inside the ExcelDna.AddIn package, and no longer an executable that is run as a post-build step.

The “ExcelDnaPack” NuGet package is a community-contributed package that provides the ExcelDnaPack.exe for backward compatibility, I think for use in other build systems like Cake. For normal builds you probably don’t need this.

 

You should check the following:

* What are the .dna files in the project root directory, if any?

* What are the .dna files that end up in the output directory? Make sure to clean the output directory before you build, so that old ones don’t confuse things.

* What is the console output when building? The ExcelDnaPack task writes a bit of logging the console (yes – we should change that to normal build logging).

 

I can think of the following going wrong:

* Maybe the .dna file that ends up in the output directory is different – e.g. the one on your machine that is in the project root might not be checked into source control, so the CI build doesn’t see one, and the build task creates a template .dna file to use, which won’t have your extra libraries in.

* Maybe the build sequence is different, and the extra .dll files are only getting to the output directory after the packing runs. In this case I expect the packing to fail and the build to fail, but it might be another aspect we’ve not really converted to a build task completely.

 

If you’re still stuck, you might want to post some of the details from above – what the .dna files are and what they contain, and what the console output is in the two cases.

 

-Govert

This email and any attachments is intended solely for the individual or entity to which it is addressed unless explicitly noted otherwise. This email may contain proprietary, confidential and or legally privileged information. If you have received this email in error, you may not use, copy or disclose the information in this message or any attachment in any form whatsoever. Please notify the sender and then immediately and permanently delete it. The contents of this email may not represent the opinion of Trayport Limited, its subsidiaries or affiliates and it does not constitute a contract or guarantee. Trayport Limited accepts no liability for any use of or reliance on this email by anyone. Emails are not secure and may contain viruses, experience delay or interception and their integrity cannot be guaranteed. Recipients should implement appropriate methods to check for viruses before opening any attachment. Trayport Limited does not accept liability for any damage caused by a software virus. If data privacy or a binding message is desired, recipients should use alternate methods of communication.   

 

Trayport Limited, a company registered in England and Wales.

Company Registration Number: 02769279.

Registered office: 7th Floor, 9 Appold Street, London, EC2A 2AP

VAT number: GB274666173.

 

Any trading activity is conducted with the specific trading venue. Trayport is a software provider of trading solutions and is not a trading venue. Trayport does not arrange investments or provide investment advice.  

 

Please click here for Trayport's full company information.

--
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/ee526179-d5ab-4566-a664-f57173e8b859n%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages