title: Is it possible to successfully merge transitive assembly references with ILMerge?
body: <p>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.</p>
  
  <p>In particular, I'm referencing <em>Antlr3.StringTemplate</em> (hereafter referred to as AS, available here: <a href="http://www.stringtemplate.org/download.html" rel="nofollow noreferrer">http://www.stringtemplate.org/download.html</a>).  It references <em>Antlr3.Runtime.Debug</em> (ARD) and <em>Antlr3.Runtime</em> (AR).  ARD itself also references AR.  In ASCII-art, that's:</p>
  
  <pre><code>AS ---&gt; ARD
  \        |
   \       v
    \---&gt; AR
  </code></pre>
  
  <p>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.</p>
  
  <p>No matter what permutations and options I try, I end up with an error of the following form:</p>
  
  <blockquote>
    <p>ILMerge.Merge: The assembly
    'Antlr3.Runtime.Debug' was not merged
    in correctly. It is still listed as an
    external reference in the target
    assembly.</p>
  </blockquote>
  
  <p>Is what I'm trying to accomplish with ILMerge even possible?</p>