1

I am back trying to compare two .exe's, this time with some changes.

  • Building project in Microsoft Visual Studio 2010
  • Project target framework = .NET Framework 3.5 Client Profile

I build the project, run dumpbin /rawdata on the .exe and output to a text file. Next I re-build the project and run dumpbin /rawdata on the new .exe and output to a new text file. I then CRC each one to make sure they are the same (no changes are made between builds).

I am getting different CRC values. When I run the raw data through windiff I am seeing differences in the Raw Data #1 section, which I believe is actual data generated from the source code of the project (please correct if I'm wrong).

There are 3 areas of difference in Raw Data #1, one of which includes a .pdb.

Questions:

  1. Does anyone know where I can turn off debugging information in VS 2010 (similar to Project Property Pages -> Config Properties -> Linker -> Debugging -> Generate Debug Info in VS 2005)
  2. Are there any tricks to finding out where the highlighted differences in WINDIFF actually exist in the source code?

Thank you, ZayJay

PS - feel free to ask for clarifications, and thanks a ton again. I've searched for a while with little success. So glad I found this resource.

EDIT / UPDATE My shift has now turned to compiling the code with ngen to bypass MSIL and whatever was showing up as differences there. One of the differences was in this area: <PrivateImplementationDetails>{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}.Dictionary... and I cannot make anything from the ascii in the other difference (I got rid of the .pdb info).

I would like to know if there is a way to view / extract the compiled code for viewing.

I've tried ngen display "App Name" and searching in WINDOWS/assembly but cannot find anything relevant (also, i do not know 100% what I am looking for either...)

Thanks for your time, ZayJay

Jeffrey Hantin
  • 35,734
  • 7
  • 75
  • 94
ZayJay
  • 199
  • 1
  • 6
  • There are timestamps in the assemblies I think, that might account for the differences. – Lasse V. Karlsen May 16 '11 at 16:39
  • Thanks, do you know if there are multiple timestamps though? Because I'm getting 3 areas of difference in what I'd expect to be identical .exe's (one of which looks like it involves a .pdb from the ascii). Or any way to turn timestamps off via project settings? – ZayJay May 16 '11 at 16:43
  • Vague memories of there being multiple ones, yes, but since they're vague, they could be wrong. I could also be totally wrong about there being timestamps in the first place. Have you verified that the changes are in the same place and are of the same size every time? – Lasse V. Karlsen May 16 '11 at 17:00
  • Also note that I know this question has been asked before and the general consensus was to avoid rebuilding your code if you didn't need to, then you don't have to deal with the changed assemblies, which apparently is a part of the deal. May I ask why you need to rebuilds to be identical, as opposed to just not rebuilding it if the code hasn't changed? – Lasse V. Karlsen May 16 '11 at 17:01
  • I am validating software for a company and the test confirms that Visual Studio 2010 will produce .exe's repeatedly and predictably. So I want to build a .exe from source, save it's raw data, then make another .exe and verify that they came out the "same." I've made it work with .exe's built from C++, but having trouble here. Also, the differences are the the same place give or take a few lines depending on the project settings I have enabled (fiddled with them to try and fix the differences) – ZayJay May 16 '11 at 17:17
  • C# and C++ are compiled differently. Make sure the assembly information ( i.e. AssemblyVersion ) is not being changed. – Security Hound May 16 '11 at 17:26
  • Nope, the assembly version is not changed between builds. :-\. Thanks for the suggestion though. – ZayJay May 16 '11 at 17:43
  • My supervisor suggested ngen.exe to bypass MSIL and attempt to `dumpbin` or run our CRC generator on that; I have never used it but am reading on about it and will update with any findings (though right now it seems like ngen.exe installs the compiled .exe into Cache so that there is not JIT compilation... am I missing something) – ZayJay May 16 '11 at 19:46

0 Answers0