Open sandboxFocusImprove this doc

PS0016: Too Many Errors

Severity Error
Reported by PostSharp
Message Maximal number of errors reached: <ErrorCount>.

Cause

PostSharp counts the errors that it reports while it builds a project. PostSharp reports PS0016 when this count reaches 500, which is a fixed limit. <ErrorCount> is the number of errors reported so far.

So many errors rarely come from 500 different mistakes. Usually, one mistake causes the same error on many declarations, for example:

  • An aspect is multicast to too many declarations, with an assembly-level attribute, a postsharp.config file or a wildcard in AttributeTargetTypes, and its compile-time validation rejects most of them.
  • An architecture constraint is applied to a whole namespace or assembly, and many usages violate it.
  • A reference of the project is missing or has the wrong version, and PostSharp cannot resolve many of the types that the aspects use.

This message requires a build that reports 500 other errors, so no example can show it.

Resolution

See Also

Reference

MulticastAttribute

Other Resources

Adding Aspects to Multiple Declarations Using Attributes