Last Modified date for the Source code.

  • Thread starter Thread starter IdleBrain
  • Start date Start date
I

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.
 
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]
 
forgot the code you asked


File.GetLastWriteTime(assemblypath)


Michel Posseth said:
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 said:
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.
 
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.
 
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.)
 
Back
Top