Assembly Versioning using CruiseControl.net

assemblyinfocruisecontrol.netversioning

I have setup CruiseControl.net for a bunch of my projects which are related.
As a result a single project tag in CruiseControl has multiple SVN checkouts and then a bunch of msbuild tasks compile all the individual sln files.

I need to update the assembly version of all the solutions when this build is being done.
However, since i'm not using nant and not using MSBuild proj files, I am unsure on how to get this.

I wonder if I'm missing something obvious. I just need a solution which can be implemented by making appropriate changes in the ccnet.config file without requiring me to make changes to csproj files.

Thanks,
Anj

Best Answer

What about using a shared AssemblyInfo across your projects?

This is what we do for our products:

  • Each project has it's own AssemblyInfo.cs - this contains AssemblyTitle, AssemblyDescription, Guid, and other attributes that are unique to that assembly.

  • Each project also has two other Assembly Info files, note that these are added as a link rather than a direct file (VS -> Add -> Existing File -> Add as link (little down arrow next to add))

The two link files:

  1. CompanyAssemblyInfo.cs - AssemblyCompany, AssemblyCopyright, AssemblyConfiguration, CLSCompliant, SecurityPermission, etc. Basically everything we want standard on all our assemblies.

  2. ProductAssemblyInfo.cs - AssemblyProduct, AssemblyVersion, AssemblyFileVersion. This allows us to push the same version across to all assemblies from the one file.

Our CI and release process is more complicated, but that's at the heart of it - a single point (file) which controls the product version (assemblies, installers, everything!)

Related Topic