我正在使用動態加載的程序集執行一些代碼Invoke。出于好奇,我在調用的方法中拋出了一個異常。它有效,我可以讀取異常,但它缺少行號。var assemblyBytes = File.ReadAllBytes(scriptPath);// I'm using this overload to avoid blocking the dll.var assembly = Assembly.Load(assemblyBytes); // allows to pass pdb bytes in the second argument.var myMethod = ...try{ myMethod.Invoke(null, parameters);}catch (TargetInvocationException e){ MessageBox.Show(e.InnerException); // missing line numbers}動態加載的程序集是在調試模式下構建的。知道為什么會發生這種情況,我怎樣才能讓它顯示行號?在這種情況下,我使用的是 .NET Framework 4.0
添加回答
舉報
0/150
提交
取消