0

I am trying to diff two versions of an application via decompiling them with DotPeek and then running a compare between them. But each file adds a header like this to the top:

// Decompiled with JetBrains decompiler
// Type: Common.ODataList`1
// Assembly: Common, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
// MVID: 11D70360-276E-4C80-B7DB-EA9D9A52D841
// Assembly location: E:\src\Scratch\ShiptrackCompare\prodDlls\Common.dll

The MVID is different for each file, so my diffs always show a difference for each file.

Is there a way to get DotPeek to not add this header?

Vaccano
  • 78,325
  • 149
  • 468
  • 850

2 Answers2

0

IMHO this is an XY-problem. What you really want is to ignore the MVID in the comparison.

Configure your difftool to ignore comments. E.g. in Winmerge, select the Prediffer to ignore comments.

Winmerge ignore comments

Thomas Weller
  • 55,411
  • 20
  • 125
  • 222
0

Instead of using dotPeek, you can use dnSpy. It will not emit such a header in decompiled code.

You might want to turn off "Show tokens, RVA and file offsets" in the options to improve comparison.

Thomas Weller
  • 55,411
  • 20
  • 125
  • 222