When you use the following format for Assembly Version Attribute
[assembly: AssemblyVersion("1.0.*")] the build number and revision are automatically generated for you when building the application.
It turns out that that a formula based on DateTime.Now is used to generate those numbers.
So to get the DateTime time stamp when the assembly was build all you have to do is:
Code Snippet
- Version v = ParseVersionNumber(Assembly.GetExecutingAssembly());
- return new DateTime((v.Build – 1) * TimeSpan.TicksPerDay + v.Revision * TimeSpan.TicksPerSecond * 2).AddYears(1999);
