Please enter the text to find and press Search.

An error occurred during search results load.

7.6. Assembly Mask

Assembly mask is a text pattern format designed for .NET assemblies selection. It is based on glob mask format but contains behavioral alterations to make the process of assembly selection more natural. Assembly mask is supported by assembly merging and assembly embedding.

7.6.1. Syntax

Assembly mask syntax is equivalent to glob mask syntax:

Table 7.4. The list of available wildcard characters

? Matches a single character
* Matches any number of characters, including zero

Wildcard characters are combined into a string to form an assembly mask with the desired properties.

When an assembly mask starts with ^ and ends with $ characters, it is switched to regex mask mode.

7.6.2. Behavior

Assembly mask differs from the glob mask in semantic behavior in order to accommodate the de jure and de facto conventions of .NET assembly naming.

Hierarchal Naming Convention

Let's take a look at Contoso.QuickRun.Engine.dll assembly name. It represents a hierarchal assembly name where Contoso is a company name, QuickRun is a product name, and Engine is a subsystem name. The naming can then follow some deeper levels of hierarchy, like so:

  • Contoso.QuickRun.Engine.Contracts.dll - the contract module of Engine subsystem of the product
  • Contoso.QuickRun.Engine.Dal.dll - the data access layer of the engine
  • Contoso.QuickRun.Engine.Integration.B2B.dll - B2B integration facilities of the engine

What should a mask like Contoso.QuickRun.Engine.*.dll select? Should it only select the submodules of Engine subsystem, or should it include Contoso.QuickRun.Engine.dll assembly as well, thus covering the whole semantical scope? Glob mask would select only the submodules, but assembly mask selects Contoso.QuickRun.Engine.dll assembly as well, and that is a conceptual difference between the two. Assembly mask makes it more handy to select .NET assemblies by interpreting the structural meaning of a pattern [1].

If such interpretation is not desired, the following assembly mask can be used instead: Contoso.QuickRun.Engine.?*.dll (note the question mark before the star). It mandates that there should be at least one character at the beginning of the string that follows after Contoso.QuickRun.Engine. prefix and before .dll suffix. Such mask matches the submodules only and does not include Contoso.QuickRun.Engine.dll in the result.

Case Sensitivity

Assembly mask is case-insensitive.

7.6.3. Examples

Table 7.5. Assembly mask examples

Assembly MaskDescription
ABC*.dll Matches any string starting with "ABC" and ending with ".dll"
A.*.dll Matches any string starting with "A." and ending with ".dll", including "A.dll"
A.?*.dll Matches any string starting with "A." and ending with ".dll", but not "A.dll"

[1] Hierarchal naming convention is followed when compatibility version is 2021.4+.


An error occurred during page load.
You can try again or go back.