I developed an ASP.NET web site. When viewing the application in the browser the version number is shown in the footer of the application. But I want to communicate the version number with the customer even if the appliction is not running.
Is it good to use a post build event for it to write it into a text file? If so, how can I access the version number (there is no predefined variable for this) and how can I write it into a text file via the command-line?
Are there any other, maybe simpler ways of getting this done?
Thanks for you help.
Edit: What I forgot to say is that it should be included when publishing the project using the Publish dialog.
You could use a build tool such as msbuild and nant to control the build number and update a application setting in the web.config.
or you can use some reflection code to retrieve it
preferably store the string in cache