How to get source/line number for IL instruction using Mono.Cecil
问题 I'm using Mono.Cecil to write a simple utility that looks for type/method usage within .NET assemblies (ex. calling ToString on enums). I am able to get find the method, but it would be cool to display the source/line information to the user. Is this possible with Mono.Cecil? 回答1: It is possible. First you should read the guide from the Mono.Cecil wiki about debugging symbols. Make sure you have Mono.Cecil.Pdb.dll near Mono.Cecil.dll, set the ReaderParameters to read the symbols as indicated