ILMerge.ExcludeFile Property

MSBuild Extension Pack

ILMergeExcludeFile Property MSBuild Extension Pack Help 4.0.12.0
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. 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.

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.

Command line option: /internalize[:excludeFile]

Default: null

Namespace: MSBuild.ExtensionPack.Framework
Assembly: MSBuild.ExtensionPack (in MSBuild.ExtensionPack.dll) Version: 4.0.0.0
See Also

Reference