NuGetPackager seems to work seamlessly with GitVersionTask 2.0.0. However,
GitVersionTask is up to version 3.4.1 and I just hate sitting at a version that
So, I updated my NuGet package to the latest version of GitVersionTask. That’s
3.4.1 right now. Too bad, so sad! That caused this error:
The problem turns out that NuGetPackager 0.5.5 is looking for a MSBuild property
called “GfvNuGetVersion”. See the code in the .targets file here.
GitVersionTask 3.4.1 (somewhere in a release since 2.0.0) changed that property
name to “GitVersion_NuGetVersion”. See the code here.
So, how to fix this? NuGetPackager will probably be updated some day, but for
now you can just translate the property in your .csproj file before the
CreatePackage task is called in NuGetPackager.
Open up your .csproj file directly in some text editor like Notepad++. Find
these two lines at the bottom of the file:
Before those two lines, add a target and a property group. The target will
create a task that translates the new property to the new property. The
property group wil define a BuildDependsOn to call that target before the
CreatePackages target is called.
Now, when you build your project, everything should work great!