Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I think you're looking for the 'exclude' parameter for the <code>/internalize</code> switch. For example, if you use</p> <pre><code>/internalize:excludes.txt </code></pre> <p>where the file <code>excludes.txt</code> contains</p> <pre><code>three.dll </code></pre> <p>it will internalize <code>one.dll</code> and <code>two.dll</code> but leave <code>three.dll</code> as an external dependancy.</p> <p>Here are a couple of blog posts that go into further detail:</p> <ul> <li><a href="http://www.bjoernrochel.de/2009/07/07/how-to-shoot-yourself-in-the-foot-with-ilmerge/" rel="nofollow">http://www.bjoernrochel.de/2009/07/07/how-to-shoot-yourself-in-the-foot-with-ilmerge/</a></li> <li><a href="http://www.blackwasp.co.uk/ILMergeInternalize.aspx" rel="nofollow">http://www.blackwasp.co.uk/ILMergeInternalize.aspx</a></li> </ul> <p><strong>Update:</strong> From the <a href="http://research.microsoft.com/en-us/people/mbarnett/ilmerge.doc" rel="nofollow">documentation</a>:</p> <blockquote> <p>2.10 ExcludeFile</p> <p>public string ExcludeFile { get; set; }</p> <p>This property is used only in conjunction with the Internalize property (Section 2.12). When this is set before calling Merge, it indicates the path and filename that will be used to identify types that are not to have their visibility modified. If Internalize is true, but ExcludeFile is "", then all types in any assembly other than the primary assembly are made non-public. Setting this property implicitly sets Internalize to true.</p> <p>The contents of the file should be one regular expression per line. The syntax is that defined in the .NET namespace System.Text.RegularExpressions for regular expressions. The regular expressions are matched against each type's full name, e.g., "System.Collections.IList". If the match fails, it is tried again with the assembly name (surrounded by square brackets) prepended to the type name. Thus, the pattern “[A].*” excludes all types in assembly A from being made non-public. (The backslashes are required because the string is treated as a regular expression.) The pattern “N.T” will match all types named T in the namespace named N no matter what assembly they are defined in.</p> <p>It is important to note that the regular expressions are not anchored to the beginning of the string; if this is desired, use the appropriate regular expression operator characters to do so.</p> <p>2.12 Internalize</p> <p>public bool Internalize { get; set; }</p> <p>This controls whether types in assemblies other than the primary assembly have their visibility modified. When it is true, then all non-exempt types that are visible outside of their assembly have their visibility modified so that they are not visible from outside of the merged assembly. A type is exempt if its full name matches a line from the ExcludeFile (Section 2.10) using the .NET regular expression engine.</p> </blockquote>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload