I'm trying to use ILMerge to internalize some transitively referenced assemblies into an assembly I'm referencing to eliminate conflicts with those transitive dependencies elsehwere in my project.
In particular, I'm referencing Antlr3.StringTemplate (hereafter referred to as AS, available here: http://www.stringtemplate.org/download.html). It references Antlr3.Runtime.Debug (ARD) and Antlr3.Runtime (AR). ARD itself also references AR. In ASCII-art, that's:
AS ---> ARD
\ |
\ v
\---> AR
Because another assembly I'm using, NHibernate 2.1, depends on different, incompatible version of AR, I wanted to use ILMerge to merge and internalize AR into AS. In theory, I think this should work; however, I'm having trouble executing the theory.
No matter what permutations and options I try, I end up with an error of the following form:
ILMerge.Merge: The assembly 'Antlr3.Runtime.Debug' was not merged in correctly. It is still listed as an external reference in the target assembly.
Is what I'm trying to accomplish with ILMerge even possible?