title: How do I automatically set assembly version during nightly build?
body: <p>We have a nightly build process that automatically versions all C++ projecs. Here's how it works. There's a common header file <code>VersionNumber.h</code> that has a specific <code>#define</code> for the version number. The nighly build checks this file out, increments the integer behind that <code>#define</code> and checks it in. All Visual C++ projects <code>#include</code> that header into their resource files and use that define for specifying the version (version is smth like <code>1.0.3.ThatNumber</code>).</p>
  
  <p>So far so good. Now I'd like to have the same for the C# class libraries built in the same daily build. Currently they all have</p>
  
  <pre><code>[assembly: AssemblyVersion("1.0.*")]
  </code></pre>
  
  <p>in the AssemblyInfo.cs files and libraries end up with <code>1.0.HorribleNumber.AnotherHorribleNumber</code> as the version and the two numbers don't correlate to the number used by C++ projects.</p>
  
  <p>How do I have the same determenistic automatic version numbering in my C# projects with minimal effort?</p>