G
Guest
I have posted a few messages in the last couple weeks
about my not being able to track down the file information
from the call stack.
The issue still remains. My C# assembly is in the GAC. I
have copied the pdb file manually to the GAC folder
C:\winnt\assembly. Still can't get the file name and file
line number info. I am getting a frame count of 4 though.
Can anyone please help me to fix this problem? BTW, thanks
everyone who has given suggestions to me to resolve the
issue. The suggestions were all very helpful.
StackTrace Trace = new StackTrace(true);
..
about my not being able to track down the file information
from the call stack.
The issue still remains. My C# assembly is in the GAC. I
have copied the pdb file manually to the GAC folder
C:\winnt\assembly. Still can't get the file name and file
line number info. I am getting a frame count of 4 though.
Can anyone please help me to fix this problem? BTW, thanks
everyone who has given suggestions to me to resolve the
issue. The suggestions were all very helpful.
StackTrace Trace = new StackTrace(true);
int Count = Trace.FrameCount;
StackFrame Frame = Trace.GetFrame(0);
String FileName = Frame.GetFileName();
int LineNumber = Frame.GetFileLineNumber();
Hi all
I posted this question a few days back. I am trying the
above code in my C# assembly. I get Count as 4. But no
matter how I try, I can't get the correct filename and
linenumber. They are always null and 0 respectively. Can
anyone help me resolve this issue?
I am using a debug build of my assembly.
Thanks a lot in advance for your replies.
..