'ILMerge merging happening successfully using .NET Framework but final execution is throwing runtime exception
Want to merge several .NET Framework DLL's into a single exe (console application). Merging is successful through command line using ilmerge but when finally executing the exe it is throwing exception.
Also when I build the project in Visual Studio (.NET Framework: 4.7.1) and opening the exe file from "Bin\Debug" folder, it is working properly.
Command Used in PowerShell ISE (Automatically taking targetplatform v4):
"$($ILMERGE_PATH)\ILMerge.exe /target:exe /allowDup /log:""$($path)\log.txt"" /out:Releases$APP_NAME $("$path\$mainProjectName\bin\$ILMERGE_BUILD\$mainProjectName").exe $getAllFilesRef"
$getAllFilesRef: List of all DLL's which needs to be included in exe.
Error shown after ILMerging and opening the exe on the same computer.Also while checking the logs there is no error seen and at last ILMerge said Done:
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|


