OnMethodBoundaryAspect not working when the solution is built in Release configuration

Hello,

We're using the OnMethodBoundaryAspect on a WCF service, specifically to trace methods that are being called. Everything works fine and the OnEntry(), OnExit() etc. overridden methods are getting called, but only when the service is built in Debug configuration. We have tested this while directly debugging in Visual Studio and while installing the service through the .NET Framework Installation utility. Only when the service is built in Release mode, the class that we have that inherits from OnMethodBoundaryAspect doesn't call the overridden methods. Are we missing an attribute or a property that we have to set for the OnMethodBoundaryAspect to trace methods in Release mode?

Cheers,
Bojan.

  1. 1 Posted by Bojan Zdravkovs... on 11 Jan, 2018 01:09 PM

    Bojan Zdravkovski (ATS Global B.V.)'s Avatar

    We missed a pretty obvious place to search for the culprit - the build events for the configuration. There was a "SkipPostSharp = true" conditional compilation symbol that was put some time ago for other reasons that was causing the issue.

    Please close this discussion as we resolved the problem.

    Thanks.

  2. Support Staff 2 Posted by PostSharp Techn... on 11 Jan, 2018 02:41 PM

    PostSharp Technologies's Avatar

    Hello,

    thanks for letting us know.

    Have a nice day!

    Best regards,
    Daniel

  3. PostSharp Technologies closed this discussion on 11 Jan, 2018 02:41 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac