views:

139

answers:

4

The creation date of an executable linked in VS2005 is not set to the real creation-date of the exe-file. Only a complete re-build will set the current date, a re-link will not do it. Obviously the file is set to some date, which is taken from one of the project-files.

So: is there a way to force the linker to set the creation-date to the real link-date?

+1  A: 

Delete the executable as part of a pre-link event.

Edit: Hah, I forgot about Explorer resetting the creation date if you name a file exactly the same as a file that was recently deleted.

Why are you keying off the creation date anyway?

MSN

Mat Noguchi
A: 

A complete rebuild will delete that file forcing the linker to create it, hence the reason it gets a new creation date. You could try disabling incremental linking under project properties (Linker | General). If that doesn't do it you could add a build event to delete the exe file and force it to create a new file each time. Both of these things could increase your build time.

Brian Ensink
A: 

Deleting the executable doesn't do the job. That's the problem. Also I could not identify any projectfile, whose datetime was the same as the later linked executable. That lets me conclude, that the 'creation date' is an information taken from within some project-file.

The project has 400000 lines, so a full build is no option.

A: 

What about using somethign like DirDate (or write a little util yourself) to set the creation date and call it from the post-build step?

Martin Beckett