I have several methods that are using an attribute I built with the help of PostSharp. The attribute has 3 constructor overloads and each overload performs logic before the OnEntry() is called. The first time a method is hit with my attribute on it, it works fine. After that, the constructors are not being hit in my attribute and only the OnEntry() is firing.
I need the constructors to be called each time the method with the attribute is called. Does anyone know a solution for this?
Thanks in advance.
You can see another topic, which shows when constructors are run: When is a custom attribute's constructor run?
Postsharp access there attributes right after compilation, but before execution (this is called post compilation). The debugger is working properly for it, so you really can set a breakpoint at constructor and see the call stack to observe from what place this constructor was called.