Automatically generate a version file, with the build number and the year, every time you build your project in Team Foundation Server.
- Copy files into your project folder.
- Include Version.rc file into your C/C++ project ([How to] (https://msdn.microsoft.com/en-us/library/6e7446zd.aspx)).
- Commit Version.rc and Version.ps1 (Version.txt should be excluded).
- Add Version.ps1 to the build process template: Build->Advanced->Pre-build script path.
- Build the project.