For many years now, I've used this code to extract and display the build time of my ASP.NET web apps:
FileInfo fileInfo = new FileInfo(Tools.EnsureSuffix(Server.MapPath("~"), "\\") + "bin\\Website.dll");
if (fileInfo.Exists)
labelBuildTime.Text = "Build Time: " + fileInfo.LastAccessTime.ToString();
It works perfectly on my development machine but I just noticed that on a deployed server, the date is about 4 days ago ... even though I just recompiled and updated it now. Why would that be?
Is there an alternate way to get the build time?
Robert
Go to the complete details ...