Fog Creek Software
Discussion Board

Welcome! and rules

Joel on Software

Build Date

this seems like a really basic question, but I've yet to find a good answer...

I want to capture the build date of my project, so I can display it in the "About" dialog.  I can't find anything useful in the framework to do this.  Do I have to do it manually?  If so, what's the simplest approach?

This is for a C# WinForms application.

Wednesday, September 1, 2004

you can add the same with main programm which u can abload in the eventoccurence where set the .main fram work.

Thursday, September 2, 2004

We're using a build tool called FinalBuilder from AtoZed software. It can be configured to put a build timestamp into the version resource of the application.

You can run a little pre-build step that runs a tiny program you wrote which generates an include file containing the build date.

Joel Spolsky
Fog Creek Software
Friday, September 3, 2004

How about reading the file's last modified date? The last time the binary had bytes written to it would - in most cases - be the date it was compiled:

using System.Reflection;
using System.IO;

string myFileName = Assembly.GetExecutingAssembly().Location;
DateTime myCreatedDate = File.GetLastWriteTime( myFileName );

Duncan Smart
Saturday, September 4, 2004

*  Recent Topics

*  Fog Creek Home