I'm trying to setup a TFS build to publish a nuget version using a different version than the one specified by the build number (I use a string for the build definition name in the build number format and would like to keep it this way).
I'm passing -version $(MajorVersion).$(MinorVersion).$(Year:yy)$(DayOfYear).$(Rev:rr) to the Packager step, but it fails with this message:
Attempting to build package from 'MyProj.Contracts.nuspec'.
[error]'$(MajorVersion).$(MinorVersion).$(Year:yy)$(DayOfYear).$(Rev:rr)' is not a valid version string.
[error]Parameter name: version
[error]Unexpected exit code 1 returned from tool NuGet.exe
How can I make this work?