Hi Ulrich,
In your output directory there is a mixture of files.
I think you’ll see:
MyLibrary.dll – your code is in here
MyLibrary.xml – descriptions etc. for your code, not used here
MyLibrary.pdb – debug information for your code
MyLibrary-AddIn.xll – 32-bit not-packed add-in loader
MyLibrary-AddIn.dna – 32-bit not-packed add-in definition
MyLibrary-AddIn64.xll – 64-bit not-packed add-in loader
MyLibrary-AddIn64.dna – 64-bit not-packed add-in definition
MyLibrary-AddIn-packed.xll – 32-bit packed single-file add-in (is like MyLibrary-AddIn.xll with MyLibrary.dll and MyLibrary-AddIn.dna packed inside it)
MyLibrary-AddIn64-packed.xll – 64-bit not-packed single-file add-in (is like MyLibrary-AddIn64.xll with MyLibrary.dll and MyLibrary-AddIn64.dna packed inside it)
So in the one output directory you have not-packed and packed versions of the add-in, for both 32-bit and 64-bit versions of Excel.
The first thing you need to know when running your add-in somewhere, is whether the Excel installation is 32-bit or 64-bit.
If you get this wrong, you’ll get the “file format and extension don’t match” error.
You can check this by opening Excel and going File -> Account -> About Excel and looking at the top.
If your Excel is 32-bit, then you have two options:
Similarly for 64-bit Excel, you use the corresponding AddIn64 files.
For debugging, things work better with the not-packed versions. So that’s what runs when you debug.
But it’s nicer to give someone else the single-file packed version.
If your library has other dependencies, say you also have MyCalculations.dll.
Then you need to tell Excel-DNA that this files should also be packed.
For this you add a <Reference …/> entry into your project’s MyLibrary-AddIn.dna file.
Please ask if you have more questions.
I’m happy to help, even though I can’t point to great documentation yet.
-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/fbbcf680-ad4c-4e1b-bd17-180c189adc3fn%40googlegroups.com.