views:

218

answers:

0

After much Googling, I found a custom task that could increment my revision number while building my project using msbuild. However, the revision number is not being updated. Without modifying my "Microsoft.VersionNumber.targets" file, the build fails and says "The version specified '0.0.090903.0' is invalid". So I found this link which has the fix but that causes the revision number to not increment by one. Below is a snipet of my "Microsoft.VersionNumber.targets" file.

<PropertyGroup>
  <AssemblyMajorVersion>0</AssemblyMajorVersion>
  <AssemblyMinorVersion>0</AssemblyMinorVersion>
  <AssemblyBuildNumber>0</AssemblyBuildNumber>
  <AssemblyRevision>0</AssemblyRevision>
  <AssemblyBuildNumberType>DateString</AssemblyBuildNumberType>
  <AssemblyBuildNumberFormat>01MMdd</AssemblyBuildNumberFormat>
  <AssemblyRevisionType>AutoIncrement</AssemblyRevisionType>
  <AssemblyRevisionFormat>00</AssemblyRevisionFormat>
</PropertyGroup>

<!-- Properties for controlling the Assembly File Version -->
<PropertyGroup>
  <AssemblyFileMajorVersion>0</AssemblyFileMajorVersion>
  <AssemblyFileMinorVersion>0</AssemblyFileMinorVersion>
  <AssemblyFileBuildNumber>0</AssemblyFileBuildNumber>
  <AssemblyFileRevision>0</AssemblyFileRevision>
  <AssemblyFileBuildNumberType>DateString</AssemblyFileBuildNumberType>
  <AssemblyFileBuildNumberFormat>01MMdd</AssemblyFileBuildNumberFormat>
  <AssemblyFileRevisionType>AutoIncrement</AssemblyFileRevisionType>
  <AssemblyFileRevisionFormat>00</AssemblyFileRevisionFormat>
</PropertyGroup>

Any ideas as to what I could be missing?

Thank you.