I currently have an app displaying the build number in its title window. That\'s well and good except it means nothing to most of the users, who want to know if they have t
One approach which I'm amazed no-one has mentioned yet is to use T4 Text Templates for code generation.
<#@ template debug="false" hostspecific="true" language="C#" #>
<#@ assembly name="System.Core" #>
<#@ import namespace="System" #>
<#@ output extension=".g.cs" #>
using System;
namespace Foo.Bar
{
public static partial class Constants
{
public static DateTime CompilationTimestampUtc { get { return new DateTime(<# Write(DateTime.UtcNow.Ticks.ToString()); #>L, DateTimeKind.Utc); } }
}
}
Pros:
Cons: