I'm trying to embed DLLs in single executable using ILMerge.
I added this command line in build events > post build event command line:
C:\Program Files\Microsoft\ILMerge\ILMerge.exe /out:$(TargetDir)Publish.exe
($TargetDir)foo.dll
but when I try to run it, I get the following error:
The command "C:\Program Files\Microsoft\ILMerge\ILMerge.exe /out:C:\Publish.exe ($TargetDir)foo.dll" exited with code 255
how can I fix this?
I believe what's happening here is that ILMerge is encountering an error when accessing the file system and simply propagating that value to it's exit code. The error 255 in windows maps to
ERROR_EA_LIST_INCONSISTENT
.I tried searching down the cause of that error and unfortunately most of the answers indicate that file system corruption is the cause.
Are you seeing this error when using other tools that touch the file in question? Many of the other reports saw the same error with explorer so I would try viewing, opening, etc ... with explorer and see if you get the same issue. If you do then the outcome isn't good as it suggests your hard drive is going bad.
Hopefully someone else will come along with a more cheerful answer.