jetan
4/29/2008 2:41:00 AM
Hi Peter,
Yes, StackFrame.GetFileLineNumber() method should meet your need. Please
note that source code line information is only contained in the private
debugging symbol files instead of the .Net assembly. This means that your
application must always generate the PDB symbol file so that
StackFrame.GetFileLineNumber() method can retrieve source line information.
Normally, this should not be a problem in debug-mode, since debug-mode
generates PDB symbol files by default.
Furthermore, debug-mode does not equally mean the PDB symbol files. We can
also configure the VS compiler/linker to generate the PDB symbol files in
release build. This allows your application to use
StackFrame.GetFileLineNumber() method in release mode.
If you have anything unclear, please feel free to feedback, thanks.
Best regards,
Jeffrey Tan
Microsoft Online Community Support
=========================================
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msdnmg@microsoft.com.
This posting is provided "AS IS" with no warranties, and confers no rights.