在ASP.Net MVC,很容易在页面上显示网站版本/构建."*"允许 for each 生成生成一个新的哈希值,因此很容易判断正在运行的网站对应于签入源代码管理的特定生成的版本.
ASP.Net MVC:
AssemblyInfo.cs
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.0.*")]
Index.cshtml
<footer>
<p>© @DateTime.Now.Year - @Html.AssemblyVersion()</p>
</footer>