Pregunta

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(_);

¿Fue útil?

Solución

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);
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top