Skip to content
/ cecil Public
forked from jbevain/cecil
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix writing symbols when using deterministic mvids. The ppdb file embeds the guid of the corresponding assembly. #25

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Mono.Cecil.Cil/PortablePdb.cs
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,11 @@ internal PortablePdbWriter (MetadataBuilder pdb_metadata, ModuleDefinition modul
this.writer = writer;
}

public void PatchMvid (Guid guid)
{
writer.PatchMvid (guid);
}

public ISymbolReaderProvider GetReaderProvider ()
{
return new PortablePdbReaderProvider ();
Expand Down
2 changes: 2 additions & 0 deletions Mono.Cecil/AssemblyWriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,8 @@ static void Write (ModuleDefinition module, Disposable<Stream> stream, WriterPar
if (parameters.DeterministicMvid) {
module.Mvid = ComputeGuid (stream.value);
writer.PatchMvid (module.Mvid);
if (symbol_writer is PortablePdbWriter ppdb_writer)
ppdb_writer.PatchMvid (module.Mvid);
}
}
} finally {
Expand Down