You can use the default version system for assemblies to track revisions number without adding anything in TFS.
If you use the Major.Minor.*
format in your AssemblyInfo
's AssemblyVersion
attribute (e.g. [assembly: AssemblyVersion("1.0.*")]
) it will generate a version according to the following format:
Major.Minor.Build.Revision
where
- Major = Your value
- Minor = Your value
- Build = Number of days since
2000/01/01
- Revision = (Number of seconds since midnight on the day
specified in Build) / 2
This will give you an always increasing number which gives you precise information on build date and time.
To use these values in your code, you can simply recover the version using Assembly.GetExecutingAssembly().GetName().Version
.