| Severity | Info |
| Reported by | PostSharp |
| Message | Detail of the dependencies for the previous error or warning: <Details> |
Cause
When several aspects transform the same declaration, PostSharp orders their transformations from the dependencies that the aspects declare. When the ordering fails, PostSharp reports one of two messages on the declaration, and immediately after it PS0124, which carries the details:
- PS0114, a warning, when two transformations that do not commute, for example an
OnMethodBoundaryAspectand aMethodInterceptionAspecton the same method, have no order between them, so that their order of execution is not deterministic.<Details>lists all the transformations of the declaration. - PS0115, an error, when the dependencies require a transformation to be both before and after another one.
<Details>lists the two transformations.
For each transformation, <Details> gives its name, such as OrderService.LogAttribute: Wrapped by advice(s) OnEntry, and on the following lines the dependencies that it declares, or (no dependency).
PS0124 is an informational message, not an error or a warning. The test framework of this documentation captures only errors and warnings, so no example can show it.
Resolution
PS0124 needs no action of its own: resolve the PS0114 or PS0115 message that comes before it, using the details to see which dependencies are missing or contradictory.
- For PS0114, order the aspects: set the AspectPriority property where you apply them, or declare a dependency on the aspect class with AspectTypeDependencyAttribute or AspectRoleDependencyAttribute.
- For PS0115, find in
<Details>the two dependencies that contradict each other, and remove or correct one of them.
See Coping with Several Aspects on the Same Target for how PostSharp orders aspects.
See Also
Reference
AspectTypeDependencyAttribute
AspectRoleDependencyAttribute
AspectPriority
Other Resources
Coping with Several Aspects on the Same Target
Ordering Advices