title: How to change Assembly Version Number using AssemblyInfoTask?
body: <p>I am trying to automate the process for setting the Version for all DLL's, after spending some time I came to know the <code>AssemblyInfo</code> Task with which it can most likely be achieved.</p>
  
  <p>So I went ahead and installed it, specifically version <strong>1.0.51130.0</strong>.</p>
  
  <p>After Installing, I manually added the <code>Import</code> Tag (by unloading the each project) of <code>AssemblyInfoTask</code> in <code>.cspoj</code> files (the solution has more than 35 proj files).</p>
  
  <pre><code>&lt;Import Project="$(MSBuildExtensionsPath)\Microsoft\AssemblyInfoTask\Microsoft.VersionNumber.Targets"/&gt;
  </code></pre>
  
  <p>Next I modified the <code>Microsoft.VersionNUmber.Target</code> file which will be installed in path: <code>C:\Program Files\MSBuild\Microsoft\AssemblyInfoTask</code>, and I modified the following section: </p>
  
  <pre><code>&lt;!-- Properties for controlling the Assembly Version --&gt;
  &lt;PropertyGroup&gt;
      &lt;AssemblyMajorVersion&gt;4&lt;/AssemblyMajorVersion&gt;
      &lt;AssemblyMinorVersion&gt;0&lt;/AssemblyMinorVersion&gt;
      &lt;AssemblyBuildNumber&gt;&lt;/AssemblyBuildNumber&gt;
      &lt;AssemblyRevision&gt;&lt;/AssemblyRevision&gt;
      &lt;AssemblyBuildNumberType&gt;DateString&lt;/AssemblyBuildNumberType&gt;
      &lt;AssemblyBuildNumberFormat&gt;01MMdd&lt;/AssemblyBuildNumberFormat&gt;
      &lt;AssemblyRevisionType&gt;AutoIncrement&lt;/AssemblyRevisionType&gt;
      &lt;AssemblyRevisionFormat&gt;00&lt;/AssemblyRevisionFormat&gt;
  &lt;/PropertyGroup&gt;
  
  &lt;!-- Properties for controlling the Assembly File Version --&gt;  
  &lt;PropertyGroup&gt;
      &lt;AssemblyFileMajorVersion&gt;4&lt;/AssemblyFileMajorVersion&gt;
      &lt;AssemblyFileMinorVersion&gt;0&lt;/AssemblyFileMinorVersion&gt;
      &lt;AssemblyFileBuildNumber&gt;&lt;/AssemblyFileBuildNumber&gt;
      &lt;AssemblyFileRevision&gt;&lt;/AssemblyFileRevision&gt;
      &lt;AssemblyFileBuildNumberType&gt;DateString&lt;/AssemblyFileBuildNumberType&gt;
      &lt;AssemblyFileBuildNumberFormat&gt;01MMdd&lt;/AssemblyFileBuildNumberFormat&gt;
      &lt;AssemblyFileRevisionType&gt;AutoIncrement&lt;/AssemblyFileRevisionType&gt;
      &lt;AssemblyFileRevisionFormat&gt;00&lt;/AssemblyFileRevisionFormat&gt;
  &lt;/PropertyGroup&gt;
  </code></pre>
  
  <p>Next I set the <code>assemblyInfo.cs</code> file's version to <code>1.0.0.0</code> in every project. Finally I saved and close it, reopened solution, and built. It works like a champ!</p>
  
  <p>Now what want is to customize the Version to <code>4.0.1053.1</code> where <code>10</code> is the part of year indicator which is 2010 and <code>53</code> denotes the week number, at last <code>1</code> denotes revision number.</p>
  
  <p>How to achieve this using the <code>AssemblyInfo</code> Task? I came across several posts that a new version of <code>AssemblyInfo</code> Task is available in Build Extension Pack.</p>
  
  <p>I have installed the <strong>MSBuild Extension Pack December 2010</strong> and its version is <strong>MSBuild Extension Pack 4.0.2.0 Installer</strong></p>