Why does C# generate different EXEs for the same source-code?

binary-reproducibility, c#, compiler-construction, hash

Solution

"So every assembly has:

- A Timestamp, in two locations

- A GUID that matched the PDB

- What appears to be a completely random GUID generated every compile.

- A counter indicating what the build of the assembly is - generated only in subsequent Visual Studio builds."

from:

http://ritter.vg/#code_adventures_clr1

Problem

Every time we recompile our C# application we end up with EXEs with different MD5 signatures. We are recompiling on the same machine, minutes apart. Why doesn't the same source-code yield the same output? Is there a way to fix this?

Original source

Related problems