.NET Questions (CLOSED)

Questions and Answers on any aspect of .NET. Now closed.

This discussion group is now closed.

Have a question about .NET development? Try stackoverflow.com, a worldwide community of great developers asking and answering questions 24 hours a day.

The archives of .NET Questions contain years of Q&A. Even older .NET Questions are still online, too.

build date

I have a c# windows app which is updated frequently (e.g. a couple times a week). My users  would like a build date. (They don't like version numbers.) Is there a build date that I can access that I have not found, or does anyone have an automatic way to create one? I really don't want to have to type in the date for each build.
Peter Vanderwaart
Tuesday, April 17, 2007
 
 
Yes .NET bascially gives you everything you need.  Use an asterisk in your assembly version like this: major.minor.*

At compile time the compiler will expand this out into a 4 section version number, in which the 3rd section is a number based on the date of compilation.

Then, at runtime, read the assembly version, compute the date that corresponds to the 3-rd part of the vversion number, and display the date to your users.

Details: "When specifying a version, you have to at least specify major. If you specify major and minor, you can specify an asterisk (*) for build. This will cause build to be equal to the number of days since January 1, 2000 local time, and for revision to be equal to the number of seconds since midnight local time, divided by 2."  - from http://msdn2.microsoft.com/en-us/library/system.reflection.assemblyversionattribute.assemblyversionattribute.aspx
John Rusk Send private email
Wednesday, April 18, 2007
 
 
Extremely cool. Thanks a lot.

Wednesday, April 18, 2007
 
 

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics
 
Powered by FogBugz