Even i faced this problem with defining the version number while developing with CRM, since i wanted to deploy the same build across all the systems. I found a way to resolve it with System value + Manual + randoms.
The version information for an assembly consists of four values:
Major Version . Minor Version . Build Number . Revision
Which makes the initial Version 1.0.0.0 by default. To make more sense i replace it with
TFS Release . TFS Sprint . Change Number . Incremented build number
Suppose in your TFS a single release consists 30 sprints and after that the release becomes 2, so the values for the first release will be:
TFS Release : 1
If the current sprint is 4, the TFS Sprint will have
TFS Sprint : 4
Now the third part is managed by the developer, for a initial version we can have 0 which can be incremented +1 for each ChangeRequest or BugFix.
Change Number: 0 -- represent initial version
Change Number: 1 -- represent change
Change Number: 2 -- represent bugfix
Although for every bugfix there might be a change in code, so it represents the code change as default. But to more more sense you can have the odd number to represent the change and even number to represent the bugfix.
The last part was the default number, thankfully .Net allows us to put * to put a default build number. It keeps on increment with every compile/build which provides a signature stamp, if someone else rebuilds it changes.
How to Implement:
Open the AssemblyInfo.cs in the Properties folder and Comment the AssemblyFileVersion, this will make the AssemblyFileVersion & AssemblyVersion same.
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.4.2.*")]
//[assembly: AssemblyFileVersion("1.0.0.0")]
So the final version will come out as: 1.4.2.4512 or something
The benefits of this approach is that you can track the Task for which the code is generated. Just by looking at the version number i can say, "Hey its the release 1 for sprint 4 and with some code change.