Open sandboxFocusImprove this doc

Errors and Warnings

PostSharp reports errors and warnings at build time, like the C# compiler. Each message has an identifier made of a prefix and a number, such as LA0250. The prefix tells which component reports the message:

Prefix Reported by
PS The PostSharp compiler: configuration, licensing, the build process.
LA The aspect framework of PostSharp.
SR The serialization of aspects.
AR Architecture constraints.
COM PostSharp.Patterns.Aggregation and the common patterns.
DOM PostSharp.Patterns.Model.
THR PostSharp.Patterns.Threading.
XAM PostSharp.Patterns.Xaml.
CAC PostSharp.Patterns.Caching.
DIA PostSharp.Patterns.Diagnostics.

Each article explains when the message is reported and how to resolve it. Most articles also include an example that reports the message and the same example fixed. Some messages depend on the license, the machine or the build environment, or cannot be reached by ordinary code, so no example can reproduce them: their articles say why, and give the resolution steps. To ignore a warning or turn it into an error, see Ignoring and Escalating Warnings.

Category Description
General Errors and Warnings Messages of the PostSharp compiler: configuration, the build process, the processing of assemblies, and unexpected errors.
Aspect Errors and Warnings Messages about aspects: applying aspects to code, multicasting, aspect classes and their advices, introductions, aspect dependencies, and the code that PostSharp generates.
Serialization Errors and Warnings Messages about the serialization of aspects and of the objects they reference, with [PSerializable] and the serializers of PostSharp.
Architecture Errors and Warnings Messages reported by architecture constraints, such as [ComponentInternal], [InternalImplement] and custom constraints.
Licensing Errors and Warnings Messages about the PostSharp license: missing or invalid license keys, the features and the number of projects a license allows, and the license server.
Aggregation and Common Pattern Errors and Warnings Messages of the COM family, reported by PostSharp.Patterns.Aggregation and the common patterns: [Aggregatable], [Child], [Reference] and [Parent], and the advisable collections.
Model Pattern Errors and Warnings Messages reported by PostSharp.Patterns.Model: INotifyPropertyChanged, aggregatable objects, undo/redo and weak events.
Threading Errors and Warnings Messages reported by PostSharp.Patterns.Threading: threading models, dispatching, and deadlock detection.
XAML Errors and Warnings Messages reported by PostSharp.Patterns.Xaml: dependency properties, attached properties and commands.
Caching Errors and Warnings Messages reported by PostSharp.Patterns.Caching.
Logging Errors and Warnings Messages reported by PostSharp.Patterns.Diagnostics, the logging library.

See Also

Other Resources

Working with Errors, Warnings, and Messages
Ignoring and Escalating Warnings