Fabrics are executed in the following order:
Project fabrics. The execution order of project fabrics is determined by the following criteria:
- The distance of the source file from the root directory. Fabrics closer to the root directory are processed first.
- The fabric namespace.
- The fabric type name.
Transitive project fabrics. The execution order of transitive project fabrics is determined by the following criteria:
- The depth in the dependency graph. Dependencies with lower depth (i.e., closer to the main project) are processed first.
- The assembly name, in alphabetical order.
Note that transitive dependencies are intentionally executed after compilation dependencies, allowing the latter to configure the former before they run.
At this stage, Metalama freezes the project configuration by invoking MakeReadOnly() on all configuration objects. Consequently, the execution order of the following fabrics shouldn't have any impact.
Namespace fabrics.
Type fabrics. Note that type fabrics can provide advice, which is executed before any aspect.
Aspects. For information about the execution order of explicitly ordered and unordered aspects, see Ordering aspects.