Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / July 2006

Tip: Looking for answers? Try searching our database.

Rebuilding dll without any changes and binary differences

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Peri - 19 Jul 2006 12:28 GMT
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?

--
Piotr
Carl Daniel [VC++ MVP] - 19 Jul 2006 14:41 GMT
> 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
Peri - 20 Jul 2006 06:43 GMT
>> I build dll and change it's name.
>> Than I build it again without any changes (neither in code nor dll
[quoted text clipped - 6 lines]
>
> -cd

Do You mean this?
[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?

Signature

Peri

Carl Daniel [VC++ MVP] - 21 Jul 2006 03:44 GMT
> 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?

You can always binary compare the files and ignore differences in the PE
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

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.