Excel-DNA / ExcelDna

Excel-DNA - Free and easy .NET for Excel. This repository contains the core Excel-DNA library.
https://excel-dna.net
zlib License
1.29k stars 274 forks source link

ExcelDnaPack.exe exited with code 1. #492

Open Fulgan opened 2 years ago

Fulgan commented 2 years ago

Hello,

I'm trying to produce an updated version of our excel addin but I'm hitting a brick wall trying to get the ExcelDnaPack.exe tool to work.

Every time I'm trying, I get

"The command ""C:\Users\steph.nuget\packages\exceldna.addin\1.5.1\build..\tools\ExcelDnaPack.exe" "bin\debug\WinEURIziReport.Formulas-AddIn.dna" /Y /O "bin\debug\WinEURIziReport.Formulas-AddIn-packed.xll"" exited with code 1."

Looking at the log, I have the following:

4>  ExcelDnaSetDebuggerOptions: EXCEL.EXE path for debugging: C:\Program Files\Microsoft Office\root\Office16\EXCEL.EXE
4>  ExcelDnaSetDebuggerOptions: Add-In for debugging: bin\debug\WinEURIziReport.Formulas-AddIn64.xll
4>  WinEURIziReport.Formulas -> C:\git.projects\WinEUR IZI report\WinEURIziReport.Formulas\bin\debug\WinEURIziReport.Formulas.dll
4>  ---
4>  ExcelDnaBuild: WinEURIziReport.Formulas-AddIn.dna -> bin\debug\WinEURIziReport.Formulas-AddIn.dna
4>  ExcelDnaBuild: ..\..\..\Users\steph\.nuget\packages\exceldna.addin\1.5.1\build\..\tools\ExcelDna.xll -> bin\debug\WinEURIziReport.Formulas-AddIn.xll
4>  ExcelDnaBuild: App.config -> bin\debug\WinEURIziReport.Formulas-AddIn.xll.config
4>  ExcelDnaBuild: ---
4>  ExcelDnaBuild: WinEURIziReport.Formulas-AddIn64.dna -> bin\debug\WinEURIziReport.Formulas-AddIn64.dna
4>  ExcelDnaBuild: ..\..\..\Users\steph\.nuget\packages\exceldna.addin\1.5.1\build\..\tools\ExcelDna64.xll -> bin\debug\WinEURIziReport.Formulas-AddIn64.xll
4>  ExcelDnaBuild: app.config -> bin\debug\WinEURIziReport.Formulas-AddIn64.xll.config
4>  ---
4>  ExcelDnaPack: bin\debug\WinEURIziReport.Formulas-AddIn.dna -> bin\debug\WinEURIziReport.Formulas-AddIn-packed.xll
4>  Using base add-in C:\git.projects\WinEUR IZI report\WinEURIziReport.Formulas\bin\debug\WinEURIziReport.Formulas-AddIn.xll
4>  System.ComponentModel.Win32Exception (0x80004005): The operation completed successfully
4>     at ResourceHelper.ResourceUpdater..ctor(String fileName)
4>     at ExcelDnaPack.PackProgram.Pack(String[] args)
4>     at ExcelDnaPack.PackProgram.Main(String[] args)
4>C:\Users\steph\.nuget\packages\exceldna.addin\1.5.1\build\ExcelDna.AddIn.targets(194,5): error MSB3073: The command ""C:\Users\steph\.nuget\packages\exceldna.addin\1.5.1\build\..\tools\ExcelDnaPack.exe" "bin\debug\WinEURIziReport.Formulas-AddIn.dna" /Y  /O "bin\debug\WinEURIziReport.Formulas-AddIn-packed.xll"" exited with code 1.

The project was updated from .net framework 4.6.1 to 4.8 and I am now using VS 2022 instead of VS 2019 to compile it.

Any suggestion about what's wrong?

govert commented 2 years ago

I suggest you try the pre-release version of 1.6.0 - I know we found a workaround for this problem which appears sometimes, though not sure what the cause is. It seems the build environment in VS 2022 required a full path to the resource update API that we call.