c# - Why is a different dll produced after a clean build, with no code changes? -
when clean build c# project, produced dll different built 1 (which saved separately). no code changes made, clean , rebuild.
diff shows bytes in dll have changes -- few near beginning , few near end, can't figure out these represent. have insights on why happening , how prevent it?
this using visual studio 2005 / winforms.
update: not using automatic version incrementing, or signing assembly. if it's timestamp of sort, how prevent vs writing it?
update: after looking in ildasm/diff, seems following items different:
- two bytes in pe header @ start of file.
- <privateimplementationdetails>{guid} section
- cryptic part of string table near end (wonder why, did not change strings)
- parts of assembly info @ end of file.
no idea how eliminate of these, if @ possible...
my best guess changed bytes you're seeing internally-used metadata columns automatically generated @ build-time.
some of ecma-335 partition ii (cli specification metadata definition) columns can change per-build, if source code doesn't change @ all:
- module.mvid: build-time-generated guid. changes, every build.
- assemblyref.hashvalue: change if you're referencing assembly has been rebuilt since old build.
if really, bothers you, best tip on finding out changing diff actual metadata tables. way these use ildasm metainfo window:
view > metainfo > raw:header,schema,rows // important, otherwise basic info next step view > metainfo > show!
Comments
Post a Comment