|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Rebuilding dll without any changes and binary differencesI build dll and change it's name.
Than I build it again without any changes (neither in code nor dll version). Than I run binary compare on this two dll's and they differ. Why? -- Piotr Peri wrote:
> I build dll and change it's name. DLLs contain a timestamp in the PE header. Also, the default > Than I build it again without any changes (neither in code nor dll > version). > Than I run binary compare on this two dll's and they differ. Why? wizard-generated AssemblyInfo contains a FileVersionAttribute that automatically generates a new file verion every time it's built. -cd On Wed, 19 Jul 2006 15:41:05 +0200, Carl Daniel [VC++ MVP]
<cpdaniel_remove_this_and_nospam@mvps.org.nospam> wrote: > Peri wrote: Do You mean this?>> I build dll and change it's name. >> Than I build it again without any changes (neither in code nor dll >> version). >> Than I run binary compare on this two dll's and they differ. Why? > > DLLs contain a timestamp in the PE header. Also, the default > wizard-generated AssemblyInfo contains a FileVersionAttribute that > automatically generates a new file verion every time it's built. > > -cd > [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] VS 2005 doesn't set Versions to 1.0.* by default like VS 2003 did. So the version doesn't change on every build. So what's the way to determine if dll was just rebuild without any changes in code? After I build solution I want to determine which dll's really changed to include them in application update. Only theese dll's and nothing more. Maybe I would be able to skip PE header and start binary compare from byte after it? But is PE header always the same size? -- Peri Peri wrote:
> So what's the way to determine if dll was just rebuild without any You can always binary compare the files and ignore differences in the PE > changes in code? After I build solution I want to determine which > dll's really changed to include them in application update. Only > theese dll's and nothing more. Maybe I would be able to skip PE > header and start binary compare from byte after it? But is PE header > always the same size? header. While the overall size of the PE header may change from one build to another (if another section was added, for example), the part of the PE header that contains the date state will always be in the same place between DLLs built with the same toolset. -cd |
|||||||||||||||||||||||