Interface Error - Cannot apply an OnMethodBoundary aspect

Technical questions about PostSharp Laos.

Interface Error - Cannot apply an OnMethodBoundary aspect

Postby rhenderson on Sat Apr 19, 2008 8:58 pm

I think this has already been address but i cant find the answer anywhere in the forum. Or should I say a clear answer.

Below is my compile error.
Error 16 PostSharp: Cannot apply an OnMethodBoundary aspect (MyApp.AOP.BBBTraceMethodInvocationAttribute) with target-site weaving on the abstract or external method "MyApp.Interface.IShellApplicationScript/AfterUnload() : void". Consider excluding the aspect from this method or use call-site weaving.

My code looks like this.
Code: Select all
    public interface IAttachmentControl
    {
        void ShowTab();       
        void LoadEntity(int EntityID);
    }


My aspect is based on..
Code: Select all
    public sealed class BBBTraceMethodInvocationAttribute : OnMethodInvocationAspect
    {
        //...


I think the answer is to exclude these interfaces from the post-compile but I dont know how. I saw something in another post about AttributeTargetMemberAttributes but not sure if thats what i need let alone how to use it.

Please help.

-Reg
rhenderson
 
Posts: 9
Joined: Sat Apr 12, 2008 9:18 pm
Full Name: Reginald Henderson
Company: Platinum Xun Solutions

Return to PostSharp Laos