Question

I want to show the publish date in the About dialog.

Was it helpful?

Solution

Unfortunately, no. ApplicationDeployment class exposes only the CurrentVersion property, not the publish time.

You could use the revision field to store the date of the build to show in the About dialog.

OTHER TIPS

As far as I know there is no direct way in Click-Once to do that.

Here is a workaround: You'd have to load the file in question (DLL or EXE) into a FileInfo object and get the modification date off it.

FileInfo oMyFile = new
   FileInfo(Assembly.GetExecutingAssembly().Location);

DateTime oBuildDate = oMyFile.LastWriteTime // or LastWriteTimeUtc - don't use "CreationTime"

Note: Technically, it's not the publishing date, but the date of the assembly on the disk of the client. You have to check if Click-Once doesn't change that date

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top