By default a Visual Studio C# Library/Console etc project comes with an AssemblyInfo.cs
file that does not include AssemblyInformationalVersionAttribute
. TeamCity allows patching this attribute if found in AssemblyInfo.cs
using AssemblyInfoPatcher.
Problem
A zero effort way of including AssemblyInformationalVersion
for TeamCity.
Possible Solutions
Use a
GlobalAssemblyInfo.cs
file and link to each project, downside: each new project will have to be linked, frustratingly annoying if (often) forget to create linkAdd
AssemblyInformationalVersionAttribute
to all templates inCommon7\IDE\ProjectTemplates\CSharp\
, downside: do it on each devs machine, mainly overkillA first build step that runs a script based on this SO answer and creates links on all
.cspproj
s, downside: will have to check back in for patching step, overly complicated
Reason
The AssemblyInformationalVersion
is useful because you can put any text there - I like to put the git hash of the commit used to build the assembly in it
Have you a better idea?