I didn't really see the behavior that you described. The code is virtually unchanged between 4.1 and 5.0.515.0.
The only difference is that in version 5 there is a check to not return any methods from TraceManager:
string result =
StackTrace trace =
for (int index = 0; index < trace.FrameCount; ++index)
StackFrame frame = trace.GetFrame(index);
MethodBase method = frame.GetMethod();
Type declaringType = method.DeclaringType;
if (declaringType != GetType() && declaringType !=
Basically the only change is the check against TraceManager. A quick sample on my end shows that the method name is correctly logged. Perhaps it's a specific case? What is your exact scenario?
Enterprise Library support engineer