Do you also pass a ReaderParameters with a PdbReaderProvider when
reading the assembly?


On Fri, Dec 6, 2013 at 3:48 PM, joer <[email protected]> wrote:
> Hi,
>
> after running cecil to save my modified assembly, the PDB file written is
> invalid. The original PDB in my case has about 130kb, the new written PDB
> just 8 KB. The main assembly gets written correctly and I added a PEVErify
> check which returns zero errors.
>
> How can I troubleshoot this ? Any settings I am missing ? Below my code:
>
>         public void SaveModifiedAssembly()
>         {
>             var _WriterParameters = new WriterParameters
>             {
>                 WriteSymbols = true,
>                 SymbolWriterProvider = new PdbWriterProvider()
>             };
>             if (enhancedAssembyName.IsNullOrEmpty())
>             {
>                 enhancedAssembyName =
> assemblyToEnhanceCecil.MainModule.FullyQualifiedName;
>             }
>             assemblyToEnhanceCecil.Write(enhancedAssembyName,
> _WriterParameters);
>             string lPEFileURL =
> Assembly.GetExecutingAssembly().GetDirectoryURL() + "\\PEVerify.exe";
>             AssemblyVerifier.AssemblyVerification.Verify(new
> FileInfo(enhancedAssembyName), lPEFileURL);
>         }
>
>
> --
> --
> --
> mono-cecil
> ---
> You received this message because you are subscribed to the Google Groups
> "mono-cecil" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.

-- 
-- 
--
mono-cecil
--- 
You received this message because you are subscribed to the Google Groups 
"mono-cecil" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to