Re: Getting the last compilation date of an assembly

Tech-Archive recommends: Fix windows errors by optimizing your registry



Hello, Yonatan!

Y> I need to display the date/time of the last version of my application.
Y> There is the possibility of manually setting the date/time every time.
Y> However, I prefer doing this (if possible) by getting the last
Y> compilation date of the main assembly.
Y> Is it possible? If yes, then how?
Y> Or should this be done by using the last-modified-date of the assembly's
Y> DLL ?

Last modified data is the simplest approach.

OTOH

If you have assembly version generated like this
[assembly:AssemblyFileVersion("1.0.*")]
then you can calculate compilation date and time.

Compiler will set assembly version in the way that
the 3rd part is the number of days since Jan 1, 2000, and the 4th part is the number of seconds since midnight
(local time) divided by 2.
This attribute can be accessed from the Assembly
object, or as the FileVersion looking at the Win32 file version resource.

--
Regards, Vadym Stetsyak
www: http://vadmyst.blogspot.com

Relevant Pages

  • Re: Identification
    ... version are manipulated to proved the date/time of compilation? ... > If the assembly uses the default assembly-version-attribute, ... > calculate date/time from the last two entries in the version. ... >> - Organization Name specified during installation. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: date/time stamp
    ... I tried to adapt the number format so that date and time display because I ... no matter what format I try to use the date displays as 01/0/1900. ... >> corresponding cellin column B to have a date/time stamp that ... >> Private Sub Worksheet_Change ...
    (microsoft.public.excel.worksheet.functions)
  • Re: Date/Time problem please help !
    ... Access stores the date/time value as a fractional number, ... and the time is the fraction of a day (.5 = ... or the Format property of the text box on your form. ... in whatever display format you need. ...
    (microsoft.public.access.tablesdbdesign)
  • Re: Time Calculations
    ... I think this is an example of why Date/Time values should NOT be used to store ... to display it in hh:nn:ss appearance. ...
    (microsoft.public.access.queries)
  • Re: Mid day start
    ... then I changed the display back to just showing the date. ... Menu: Tools/Options, Tab: View, Date format and pick one with time visible. ... Project to input start date/time, if you must: ... Use project to compute the schedule. ...
    (microsoft.public.project)