I have a problem with PostSharp, which in short can be described as "some aspects don't fire and are not shown in PostSharp Explorer".
As could be seen on a screenshot two aspects from Authorization namespace, which are inherited from MethodInterceptorAspect are presented in PostSharp explorer and two new aspects from ExceptionHandling namespace which are derived from OnExceptionAspect are not.
Below is a code of one of them: a 'standard' aspect made by manual, almost the same as working aspets except it derives from another base class. I tried to identify the problem commenting different parts of code but it didn't help.
[Serializable]
[AttributeUsage(AttributeTargets.All)]
public class HandleExceptionAttribute : OnExceptionAspect
{
/// <summary>
/// Method executed <b>after</b> the body of methods to which this aspect is applied,
/// in case that the method resulted with an exception (i.e., in a <c>catch</c> block).
/// </summary>
/// <param name="args">Advice arguments.</param>
public override void OnException(MethodExecutionArgs args)
{
// some exception handling code
}
}
Moreover I just added a simple aspect right from the sample and it also not shown in PostSharp Explorer.
Question
So the question is: why aspects don't compile and fire?