ExcelDnaPack Unhandled Exception

Nov 21, 2013 at 4:36 PM
Hi Govert,

I had an Unhandled Exception with a rather strange message attached: "The operation completed successfully".
The standard window appeared saying "application is stopping; trying to restart" bla bla bla meaning: it crashed.
It happened only once; when I retried, everything went OK.
I forgot to look if the target xll was generated.

Here is the output generated by the ExcelDNAPack tool:
Using base add-in <ExcelDNAPath>IssClient.xll
  ->  Updating resource: Type: ASSEMBLY_LZMA, Name: EXCELDNA.INTEGRATION, Length: 51807
  ~~> ExternalLibrary path ISSClient.dll resolved to <SourcePath>ISSClient.dll.
  ->  Updating resource: Type: ASSEMBLY_LZMA, Name: ISSCLIENT, Length: 8063
  ->  Updating resource: Type: DNA, Name: __MAIN__, Length: 379

Unhandled Exception: System.ComponentModel.Win32Exception: The operation completed successfully
   at ResourceHelper.ResourceUpdater.EndUpdate(Boolean discard)
   at ExcelDnaPack.PackProgram.Main(String[] args)
Some extra information:
I'm running on win7x64
The tool was started from a post-build event during a solution rebuild on VS2010.
The base xll, the ExcelDna.Integration.dll and the ExcelDnaPack.exe are version 0.30.22.1
IssClient.dll was built against .NET V4.0 Client Profile
Content on the IssClient.dna file:
<DnaLibrary Description="ISSClient Excel AddIn" Language="CS" RuntimeVersion="v4.0">
    <ExternalLibrary Path="ISSClient.dll" Pack="true" />
</DnaLibrary>
The base xll, the ExcelDna,Integration.dll, ExcelDnaPack.exe and IssClient.dna are all together in one folder.

I hope you can trace what went wrong.

Gertjan
Coordinator
Nov 22, 2013 at 8:11 AM
Hi Gertjan,

That's a bit mysterious. The exception would have been thrown by a call to the Win32 API, but exact error information is lost.

For now I'll ascribe it to cosmic rays ;-)
Let me know if it happens repeatedly.

-Govert
Jul 15, 2014 at 4:04 AM
I had and worked around a similar message. In my case it was a readonly xll file that when copied maintained the attribute and then could not be "packed".

Adding attrib -r "dir*.xll" worked around the issue in the post build event.