When trying to build DD4T templates solution, I get error "ILMerge.exe exited with code 1" and I don't get DD4T.Templates.merged.dll. Any pointers to solve this?
This isn't really a problem with Tridion, although it's a common enough technique used in Tridion implementations.
In the post-build steps of your Visual Studio project. I expect that you'll find the command that invokes ILMerge.
Check in the output window in Visual Studio for more detailed error messages from ILmerge. This should allow you to diagnose your problem.
Alternatively, you can copy the command, manually replace the variables, and run the ILMerge command yourself from the command line.
Edit: As I've noted in the comments, Rick's has given a better direct answer to the question. However, figuring out which arguments are passed to ILMerge, and then invoking it yourself on the command line is a powerful debugging technique, so I'm leaving it here as a suggestion for when you run out of road trying to debug it in place.
When testing from the command line, you can also dig into the ILMerge documentation and perhaps pass the
/log argument to get it to emit logging. It The documentation also describes various scenarios which it can not cope with.
It uses an
ILMerge MSBuild target to invoke ILMerge and lets it log to
You have to ensure that ILMerge is installed for this to work, though.