Null Reference Exception when no Pinned Version


Not sure if anyone contributes here or not, this is the first post.  I've been using this project for awhile and had some suggestions or maybe they are problems with the way I am using the tool.  Here are my observations.
1.  Latest version has a bug in the code: In VersionUpdater.cs, options.PinVersion is null throws an exception, need to wrap:
// if pin version build number is invalid
if (options.PinVersion != null)
    if (options.PinVersion.Build == -1)
        calculator.BuildNumberType = options.BuildNumberType;
        calculator.BuildNumberType = BuildNumberType.Fixed;
  1. When using this utility, what is the best practice for updating a source tree.  I've looked at the samples and don't see a sample for running this with a build system.  It would be nice to use this in conjunction with MSBuild to update a group of files.   Something like this:
<!-- Set the AssemblyInfoFiles items dynamically --> <CreateItem Include="$(SolutionRoot)**\$(AssemblyInfoSpec)">
    <Output ItemName="AssemblyInfoFiles" TaskParameter="Include" />
<Exec WorkingDirectory="$(SolutionRoot)\Sage" Command="UpdateVersion.exe -b $(AssemblyInfoFiles)" />



This would allow the developer a way to update all the AssemblyInfo files in a directory Hierarchy in one fell swoop.  The only alternative to this that I see is having to run Pre-Build Events like:
"$(OutDir)UpdateVersion.exe" -p -b BuildDay -r Fixed -v Assembly -i $(ProjectDir)Properties\AssemblyInfo.cs -o $(ProjectDir)Properties\AssemblyInfox.cs
"$(OutDir)UpdateVersion.exe" -p -b BuildDay -r Fixed -v File -i $(ProjectDir)Properties\AssemblyInfox.cs -o $(ProjectDir)Properties\AssemblyInfo.cs
I don't see a way around calling this twice as the Input can't be the same as the Output.  Wouldn't this be the normal use case however, to simply Update the AssemblyInfo files?
Closed Oct 26, 2009 at 7:22 AM by flanakin
Fixed in 1.3.1