I'm using TFS to push a NuGet package to an internal feed and it works fine except that it chops off the last digit of the version number for the package.
Here's what I get in the log file:
2017-01-12T14:22:47.5046993Z [command]C:\BuildAgent\tasks\NuGetPublisher\0.2.21\node_modules\nuget-task-common\NuGet\3.3.0\NuGet.exe push -NonInteractive C:\BuildAgent_work\17\b\MyNugetPackageExample.3.0.0.0.nupkg -Source \\MyExampleServer\MyExampleShare\MyExampleNuGetFeed -ApiKey VSTS 2017-01-12T14:22:47.9734608Z Pushing MyNugetPackageExample 3.0.0 to '\\MyExampleServer\MyExampleShare\MyExampleNuGetFeed'... 2017-01-12T14:22:48.0047074Z Your package was pushed.
The log shows that the version number on the package file I've created is 3.0.0.0, but when it pushes that has changed to 3.0.0. This means I end up with a file name of MyNugetPackageExample.3.0.0.nupkg which different from the original version.
It's worth nothing that this all worked fine previously before upgrading the TFS server to the latest version. The versioning of our assemblies is non-standard so we need all 4 digits in the NuGet package.
How I can get it to stop messing around with the package file name?
Additional Info (13/01/2017):
It turns out that the package MyNugetPackageExample.3.0.0.0.nupkg created by the NuGet Packager uses the version 3.0.0 in the NuSpec file when the -version parameter was explicitly set to 3.0.0.0 and the file produced has 3.0.0.0 in the file name.
When the package is pushed it updates the file name to use version held in the NuSpec file.
If you look at tihs NuGet documentation you can read "A zero in the fourth part of the version number will be omitted":
1.0.0.0 is treated as 1.0.0
1.0.01.0 is treated as 1.0.1