Is there a way to display the lines in the stack trace for the .NET assembly build/deployed in Release mode?
UPDATE:
My application is divided into t
This works every time. You just need to substring the stack trace message. Real Easy! Also, in vb.net you do need to do the "Show All Files" and include the pdb.
'Err is the exception passed to this function
Dim lineGrab As String = err.StackTrace.Substring(err.StackTrace.Length - 5)
Dim i As Integer = 0
While i < lineGrab.Length
If (IsNumeric(lineGrab(i))) Then
lineNo.Append(lineGrab(i))
End If
i += 1
End While
'LineNo holds the number as a string
C# version:
string lineGrab = error.StackTrace.Substring(error.StackTrace.Length - 5);
int i = 0;
int value;
while (i < lineGrab.Length)
{
if (int.TryParse(lineGrab[i].ToString(), out value))
{
strLineNo.Append(lineGrab[i]);
}
i++;
}