title: Change only Revision number in AssemblyInfo.cs with MSBuild FileUpdate task
body: <p>I need to change only the revision number of an <code>AssemblyInfo.cs</code> file. The version number is in the format <em>Major.Minor.Build.Revision</em> e.g. <code>1.4.6.0</code>.</p>
  
  <p>Currently I change the version with the <code>FileUpdate</code> task (from the <a href="http://msbuildtasks.tigris.org/" rel="nofollow noreferrer">MSBuild Community Tasks Project</a>) and the following regex:</p>
  
  <pre><code>&lt;FileUpdate Files="@(AssemblyResult)"
      Regex='(\[\s*assembly:\s*AssemblyVersion\(\s*"[^\.]+\.[^\.]+)\.([^\.]+)(\.)([^\.]+)("\)\s*\])'
      ReplacementText='[assembly: AssemblyVersion("$(AssemblyMajorNumber).$(AssemblyMinorNumber).$(AssemblyBuildNumber).$(Revision)")]' /&gt;
  </code></pre>
  
  <p>Now I need to update only the revision number and leave major,minor and build unchanged.
  So, is there any task to do this? Or can it be done with a regex? What would be the regular expression then?</p>