Open BrainSlugs83 opened 5 years ago
It's nice if you describe the msbuild as a task after build.
Concerning 2 and 3, at least in my case I could see from the output console that the ILMergeConsolePath was correctly defined. You can also reconcile the discrepancy between the comment and the code with a look at the package's build\ILMerge.props which defines ILMergeConsolePath.
What worked for me was following the readme, updating the version, and making my paths absolute:
<Exec Command="$(ILMergeConsolePath) /out:"$(TargetDir)Merged.dll" "$(TargetDir)File1.dll" "$(TargetDir)File2.dll"" />
Similar to above, I do this task post build. Not sure if there's a means to set the working directory, as that would be preferred.
I too am seeing this issue - ILMergeConsolePath isn't populated. If I look at ILMerge.props it's defined as <ILMergeConsolePath>$(MSBuildThisFileDirectory)..\tools\net452\ILMerge.exe</ILMergeConsolePath>
EDIT: I switched to using ILRepack and it worked perfectly.
Per the current readme.md:
This has multiple problems... :-/ 1.) The latest version of the package on the NuGet gallery is only 2.14.1208 -- so, the package reference fails.
2.) Even after updating the package reference, the ILMerge target will fail, because $(ILMergeConsolePath) is not defined (is there a targets file we need to import??)
3.) The comment refers to the property is the "ILMergePath" property (instead of ILMergeConsolePath) -- which is also not defined.