1

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?

2

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.

3
  • 1
    I guess that you will see more details about how ILMerge failed in the Visual Studio Output Window (there may not even be a need to run the command separately). – Rick Pannekoek Jan 15 '17 at 10:26
  • Thanks Rick. That's definitely an improvement. I've edited the answer to incorporate this. – Dominic Cronin Jan 15 '17 at 11:39
  • I could not see any post-build scripts for any of the projects. – GVK Jan 15 '17 at 18:14
1

Check out https://github.com/dd4t/DD4T.TridionTemplates/blob/develop/DD4T.TridionTemplates.Targets

It uses an ILMerge MSBuild target to invoke ILMerge and lets it log to ilmerge.log. You have to ensure that ILMerge is installed for this to work, though.

3
  • We can assume ILMerge is available from the error message. Still - you are on the right track here. As we're talking about the DD4T build, my initial easy assumption that it was a post-build step was wrong. So +1 to you and -1 to me. – Dominic Cronin Jan 16 '17 at 22:02
  • Apparently I can't downvote my own post. Still - Rick's is the right answer. – Dominic Cronin Jan 16 '17 at 22:03
  • Log file is not getting generated. Also, in output window there is only one error related to ILMerge, no other information, but lot of warnings like warning CS1591: Missing XML comment for publicly visible type or member 'DD4T.Templates.AddTargetGroups.TransformPage(DD4T.ContentModel.Page) – GVK Jan 17 '17 at 16:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.