UpdateVersion is a free .NET application that includes source code and the download page contains a nice user's guide on all the command line flags. The program takes as input, a path to an existing file (like AssemblyInfo.cs) that has your build information and replaces the data with a new string based on the format you specify in command line parameters. You can easily hook this into your automated build process using the Build Event tab of the project properties dialog as shown in the image.
In my case I wanted to use the BuildDay option which makes the build number out of the last digit of the year and the day of the year. The flag for that option is: -b BuildDay. I wanted a simple increment for the revision and that flag is: -r Increment.
In the Pre-build event command line I added two lines. The first line runs UpdateVersion and creates a new AssemblyInfo_new.cs file.
Then since I want this file to replace my existing file I added a second line
move AssemblyInfo_new.cs $(ProjectDir)Properties\AssemblyInfo.cs
All that is left is to build the project and the build and revision numbers automatically increment in my preferred format. If your preferred format isn't included, you can modify the source code and make it do what you want. The existing options are pretty flexible though and will probably satisfy most people.
When using it for Eclipse I want to have it update a .h file that holds a string with my version information. I only had to change the regular expression routine to make the leading and trailing quote symbols optional (\"?) instead of required. Now in my header file I have
const char REVISION_MSG = "AssemblyVersion(1.0.8158.2)";
Every time I build the string automatically updates. In Eclipse I integrated the tool by using the projects property dialog and selecting the C/C++ Build Section. In the area to the right I selected the Build Step tab and then entered the command in the Pre-build step area as shown in the image.