How should I version an ASP.NET Web Site project?
问题 I've got an ASP.NET Web Site project and I'd like to display a version number and publish date, but I'm not sure how best to determine these. For example, the following code just outputs 0.0.0.0 LabelVersion.Text = Assembly.GetExecutingAssembly().GetName().Version.ToString(); Should I determine the assembly version somehow during build time and store this? I'm using CruiseControl.Net with MSBuild. 回答1: Well using the executing assembly is not neccessary a good choice as the executing assembly