I have discovered what is happening in my code. In the logger part, using log4Net, I have this code:
public static void Info(string strMsg) { StackTrace st = new StackTrace(true); StackFrame sf = st.GetFrame(1); _log.Info(string.Format("{0,-25} L{1:0000} {2}", sf.GetFileName().Substring(sf.GetFileName().LastIndexOf(@"\") + 1), sf.GetFileLineNumber(), strMsg)); }
So, I changed the entries to something like this:
public static void Debug(string strMsg) { StackTrace st = new StackTrace(true); #if DEBUG StackFrame sf = st.GetFrame(1); _log.Debug(string.Format("{0,-25} L{1:0000} {2}", sf.GetFileName().Substring(sf.GetFileName().LastIndexOf(@"\") + 1), sf.GetFileLineNumber(), strMsg)); #else _log.Debug(string.Format("{0}",strMsg)); #endif }
And now everything works fine without PDB files. Therefore, to collect information from stacktrace, PDB files are required.
source share