Home All Groups Group Topic Archive Search About

Last Modified date for the Source code.

Author
9 Jun 2006 2:50 PM
IdleBrain
Hello All,
Is it possible to obtain the last Modified date for the source code
from within the application?
If yes, please let me know how it is done.

Author
10 Jun 2006 6:38 PM
Michel Posseth [MCP]
if you mean with this the last compile date ( last file modification date of
the assembly ) yest this can be obtained
if you mean the last modification date of the seperate sourcecode files in
the compiled assembly  AFAIK this answer is No

regards

Michel Posseth [MCP]



Show quoteHide quote
"IdleBrain" <indianmostwan***@yahoo.com> schreef in bericht
news:1149864628.850489.93490@y43g2000cwc.googlegroups.com...
> Hello All,
> Is it possible to obtain the last Modified date for the source code
> from within the application?
> If yes, please let me know how it is done.
>
Author
12 Jun 2006 7:54 AM
M. Posseth
forgot the code you asked


File.GetLastWriteTime(assemblypath)


Show quoteHide quote
"Michel Posseth [MCP]" wrote:

> if you mean with this the last compile date ( last file modification date of
> the assembly ) yest this can be obtained
> if you mean the last modification date of the seperate sourcecode files in
> the compiled assembly  AFAIK this answer is No
>
> regards
>
> Michel Posseth [MCP]
>
>
>
> "IdleBrain" <indianmostwan***@yahoo.com> schreef in bericht
> news:1149864628.850489.93490@y43g2000cwc.googlegroups.com...
> > Hello All,
> > Is it possible to obtain the last Modified date for the source code
> > from within the application?
> > If yes, please let me know how it is done.
> >
>
>
>
Author
12 Jun 2006 11:59 AM
IdleBrain
Hello Posseth,
It works! Thank You.

I've used:
IO.File.GetLastWriteTime("C:\MyProject\bin\MyProject.exe")
As you can see I am trying to get the last build date of the project.

Do you see any problems of retreiving this date once I deploy the
project..since..this exe file will not be present in the same location.
Is it a good idea to specify a hardcoded path like this?

Thanks again.
Author
12 Jun 2006 12:50 PM
IdleBrain
I've started using:
strPath = System.AppDomain.CurrentDomain.BaseDirectory()
strAppname = _
System.Reflection.Assembly.GetExecutingAssembly().GetName().Name &
".exe"
Me.lblDate.Text = "Last Build : " & IO.File.GetLastWriteTime(strPath &
strAppname)

This seems to work good.
Thanks..
(Its unfortunate..I cannot rate myself.)