title: Simple approach to updating AssemblyInformationalVersion via TeamCity's AssemblyInfo patcher feature
body: <p>By default a Visual Studio C# Library/Console etc project comes with an <code>AssemblyInfo.cs</code> file that does not include <code>AssemblyInformationalVersionAttribute</code>. TeamCity allows patching this attribute if found in <code>AssemblyInfo.cs</code> using <em>AssemblyInfoPatcher</em>. </p>
  
  <p><strong>Problem</strong></p>
  
  <p>A zero effort way of including <code>AssemblyInformationalVersion</code> for TeamCity.</p>
  
  <p><strong>Possible Solutions</strong></p>
  
  <ul>
  <li><p>Use a <code>GlobalAssemblyInfo.cs</code> file and link to each project, <em>downside: each new project will have to be linked, frustratingly annoying if (<strong>often</strong>) forget to create link</em></p></li>
  <li><p>Add <code>AssemblyInformationalVersionAttribute</code> to all templates in <code>Common7\IDE\ProjectTemplates\CSharp\</code>, <em>downside: do it on each devs machine, mainly overkill</em></p></li>
  <li><p>A first build step that runs a script based on <a href="https://stackoverflow.com/a/6771884/269452">this SO answer</a> and creates links on all <code>.cspproj</code>s, <em>downside: will have to check back in for patching step, overly complicated</em></p></li>
  </ul>
  
  <p><strong>Reason</strong></p>
  
  <p>The <code>AssemblyInformationalVersion</code> 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</p>
  
  <p>Have you a better idea?</p>