Re: Getting the last compilation date of an assembly
- From: "Vadym Stetsyak" <vadym_s@xxxxxxx>
- Date: Mon, 7 Aug 2006 13:32:47 +0300
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
- Prev by Date: RE: More than one CLR per process / addin isolation
- Next by Date: Executing a method in a given thread context
- Previous by thread: Loading an assembly from byte stream
- Next by thread: Executing a method in a given thread context
- Index(es):
Relevant Pages
|