How to add the publication date to the project that I am posting in vs2010?

I know that I can add a version number in the help menu

application.pruductversion

but I donโ€™t know how to add the date when the application was published.

+4
source share
2 answers

If you want to display the build date of your build, this should do this in most cases:

public static DateTime GetBuildDate() { UriBuilder uri = new UriBuilder(Assembly.GetExecutingAssembly().CodeBase); return File.GetLastWriteTime( Path.GetDirectoryName(Uri.UnescapeDataString(uri.Path)) ); } 

There is also another way to determine the real compilation / build date of the โ€œhard wayโ€ here on SO:

+9
source

Use the AssemblyInfo file for more information: AssemblyInfo on MSDN

If you want to add the version number in the add / remove programs menu, you need to change the msi file using something like SuperOrca or programmatically use something like Phavant MSI (google it)

+1
source

Source: https://habr.com/ru/post/1335879/


All Articles