Hi Govert,
Thanks for your quick reply and apologies for getting back late to you.
All works as per instructions. In fact I can also add another library (NLog.dll) as a packed library, which is what I was trying to do. I am not sure what was different in your instructions, but hey this works.
There were issues in post build instructions though. I use VS2017 community edition
1. $(ProjectDir)\ does need the \, so removed them.
2. $(ProjectDir)packages is actually $(ProjectDir)..\packages
3. I didnt test regsv32 as I intend to share my code, so I wish to have same user experience, viz running my xll/tlb with no regsv32 registrations (lack of admin rights)
I have pasted the amended post-build I had to use
REM Setting up environment vairables
REM this is the location of dev cmd line, which is also available as dev prompt on start menu
call "$(DevEnvDir)..\Tools\VsDevCmd.bat"
REM Temporarily copy ExcelDna.Integration.dll into output
REM Note: Might need to change depending on where packages directory is
copy "$(ProjectDir)\packages\ExcelDna.Integration.0.34.6\lib\ExcelDna.Integration.dll" "$(TargetDir)"
REM Create .tlb file
tlbexp.exe "$(ProjectDir)$(OutDir)$(TargetName)$(TargetExt)" /out:"$(ProjectDir)$(OutDir)$(TargetName).tlb"
REM Delete extra copy of ExcelDna.Integration.dll from output
del "$(TargetDir)ExcelDna.Integration.dll"
REM Re-run the packing to include the .tlb inside the packed files for distribution
REM Note: Might need to change depending on where packages directory is
"$(ProjectDir)..\packages\ExcelDna.AddIn.0.34.6\tools\ExcelDnaPack.exe" "$(ProjectDir)$(OutDir)$(TargetName)-AddIn.dna" /Y /O "$(ProjectDir)$(OutDir)$(TargetName)-AddIn-packed.xll"
"$(ProjectDir)..\packages\ExcelDna.AddIn.0.34.6\tools\ExcelDnaPack.exe" "$(ProjectDir)$(OutDir)$(TargetName)-AddIn64.dna" /Y /O "$(ProjectDir)$(OutDir)$(TargetName)-AddIn64-packed.xll"