문제

There was a AssemblyDefinition.MainModule.SaveSymbols(); But in version 0.9.5.0, how we can save a .pdb file before saving an AssemblyDefinition.

//Here to add the command for save the .pdb file

AssemblyDefinition.Write(_);

도움이 되었습니까?

해결책

You first need a copy of the Mono.Cecil.Pdb.dll assembly and then add a reference to that assembly from your application.

Code wise you do:

var parameters = new WriterParameters ();
parameters.SymbolWriterProvider = new Mono.Cecil.Pdb.PdbWriterProvider ();
assembly.Write ("myassembly.dll", parameters);
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top