I have an automated build system using CruiseControl. I am using the SvnRevisionLabeller to to get the version string to use. With this string I can use nant to update AssemblyInfo.cs so when I build it has the correct build string. I can also use this CC label to tag the subversion repository.
So everything is aligned
- CCNet Build label
- Executable (Assembly Information)
- Version Control (subverson tag)
Now where I have a problem is if I want to try to rebuild an old image from the repository. Since AssemblyInfo.cs is not under version control but rather a generated file, when I now try to build, the versioning information will not be the same as it was when this version of the repository was built using CruiseControl. I would like to be able to generate exactly the same image regardless of whether it was built during the CC build or at a later date when checking out from Subversion.
I know that it is often not recommended, but should I check-in the assemblyInfo.cs file after each build so that when I build subsequently from a svn check-out the correct version information will be used?
Thanks, Liam