I've made a very simple aspect, and found a problem when debugging it (see code). I set a breakpoint on the method exit, and it hits inside "entry" method actually. PostSharp 1.5, Visual Studio 2008 SP1
Is this a known bug, are there any workarounds?
class Program
{
[MyAspect]
static void Main(string[] args)
{
Console.WriteLine("body");
} // setting breakpoint here
}
[Serializable]
class MyAspect : OnMethodBoundaryAspect
{
public override void OnEntry(MethodExecutionEventArgs eventArgs)
{ // hits here actually! (debug mode)
Console.WriteLine("entry"); // hits here actually! (release mode)
}
public override void OnExit(MethodExecutionEventArgs eventArgs)
{
Console.WriteLine("exit");
}
}