how do I get the version dates in vb

  • Thread starter Thread starter TFS
  • Start date Start date
T

TFS

I am new to vb net and was wondering if there is an equivalent to the
__DATE__
and __TIME__ macros in C/C++.

That is I'd like to get the date/time the program was "compiled".

Is there an easy way to get this?

Thanks a lot in advance,
--TFS
 
TFS said:
I am new to vb net and was wondering if there is an equivalent to the
__DATE__
and __TIME__ macros in C/C++.

That is I'd like to get the date/time the program was "compiled".

Is there an easy way to get this?

Thanks a lot in advance,
--TFS

I do not think there is any way to retrieve the date/time an assembly was
compiled. AFAIK, it's not written to the assembly...anywhere.

:(

Mythran
 
TFS said:
I am new to vb net and was wondering if there is an equivalent to the
__DATE__
and __TIME__ macros in C/C++.

That is I'd like to get the date/time the program was "compiled".

Is there an easy way to get this?

No, no easy way. Maybe...

- Use "1.0.*.*" as the assembly version and retrieve it at runtime (use
a function for that to supstitute __DATE__ or __TIME__). The asterisks
determine the number of days since 1/1/2000 and seconds since midnight
(see AssemblyVersionAttribute).

- Use the pre-build event to start a tool that writes the current
date/time into a source code file. Well, far-fetched maybe...

- An Addin?

Just some thoughts.

The exe's/dll's change date is insufficient? Depends on why you need the
compile date/time.


Armin
 
Back
Top