Replaces AssemblyInfo.cs versions with Major.Minor.YYDOY.HHmm
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

MsBuild Task Dated Version

Replaces AssemblyInfo.cs versions with Major.Minor.YYDOY.HHmm
Example, 1.0.16001.1030 for Jan 1, 2016 10:30 AM

The last segment (timestamp) can be manually edited with msbuild parameter /P:BuildNumber=[number]
Example, 1.0.16001.99 for Jan 1, 2016 /P:BuildNumber=99


This requires the nuget package MSBuildTasks

Install-Package MSBuildTasks


To use this library, add .build\DateStampVersion.tasks to your solution folder.

Included Sample

You can use the inluded Build.proj to execute your solution file and update all versions, or you can manually add the build task to each project file.

Optional Manual Steps

Modify each PROJECT (*.csproj, *.vbproj) file to include the add the following to the top (after the <Project ...> tag)

<Import Project="$(MSBuildProjectDirectory)\DateStampVersion.tasks" />
  <RegexTransformItems Include="**\AssemblyInfo.cs" />

Modify existing lines:

<Target Name="Go" DependsOnTargets="Build">
<Target Name="Go" DependsOnTargets="UpdateAssemblyVersion; Build">

Add the following to the bottom of the file (before the </Project>)

  <Target Name="UpdateAssemblyVersion" >
      <RegexTransform Items="@(RegexTransformItems)" Vers="$(BuildNumber)" />

Execute the build normally, or add the BuildNumber parameter to your MSBuild command.