Hi, I have just upgraded from OctoPack 3.4.7 to 3.5.0 and now my solution won’t build with a problem in OctoPack.3.5.0\build\OctoPack.targets:
\packages\OctoPack.3.5.0\build\OctoPack.targets(47,72): error MSB4064: The “UseProductVersion” parameter is not supported by the “GetAssemblyVersionInfo” task. Verify the parameter exists on the task, and it is a settable public instance property.
Any ideas how to get around this?
Thanks for reaching out! Could you please send me the build log where I can see the MSBuild comments that are being passed? If you are running if from the VS Console, send me a screenshot where I can see the full command + output.
Finally please also send the contents of your
It fails from both MSBuild.exe (via Team City) and in Visual Studio itself. I had downgraded OctoPack back to 3.4.7 (like the other projects in the solution still use) so just upgraded this one project to 3.5.0 and this is the VS build output:
1>------ Rebuild All started: Project: dunnhumby.IdSrv.Core.Interfaces, Configuration: Release Any CPU ------
1> dunnhumby.IdSrv.Core.Interfaces -> D:\Dev\Idsrv\dunnhumby.IdSrv.Core.Interfaces\bin\Release\dunnhumby.IdSrv.Core.Interfaces.dll
1> OctoPack: Written files: 10
1> OctoPack: Files will not be added because the NuSpec file already contains a <files /> section with one or more elements and option OctoPackEnforceAddingFiles was not specified.
1> OctoPack: NuGet Version: 220.127.116.11733 (Custom build for OctoPack. See http://g.octopushq.com/VersioningInOctopusDeploy)
1> OctoPack: Attempting to build package from 'dunnhumby.IdSrv.Core.Interfaces.nuspec'.
1> OctoPack: Successfully created package 'D:\Dev\Idsrv\dunnhumby.IdSrv.Core.Interfaces\obj\octopacked\dunnhumby.IdSrv.Core.Interfaces.18.104.22.168.nupkg'.
1> OctoPack: OctoPack successful
2>------ Rebuild All started: Project: dunnhumby.IdSrv.Core, Configuration: Release Any CPU ------
2> dunnhumby.IdSrv.Core -> D:\Dev\Idsrv\dunnhumby.IdSrv.Core\bin\Release\dunnhumby.IdSrv.Core.dll
2>D:\Dev\Idsrv\packages\OctoPack.3.5.0\build\OctoPack.targets(47,72): error MSB4064: The "UseProductVersion" parameter is not supported by the "GetAssemblyVersionInfo" task. Verify the parameter exists on the task, and it is a settable public instance property.
2>D:\Dev\Idsrv\packages\OctoPack.3.5.0\build\OctoPack.targets(47,5): error MSB4063: The "GetAssemblyVersionInfo" task could not be initialized with its input parameters.
========== Rebuild All: 1 succeeded, 1 failed, 0 skipped ==========
AssemblyInfo.cs is attached too.
AssemblyInfo.zip (799 Bytes)
And just to confirm, it’s not just a single project that fails, if I choose another project to upgrade to 3.5.0 to it fails - with the same OctoPack.targets error
UseProductVersion was introduced in version 3.5.0 and I have just double checked that it works.
If I try to run a 3.5.0 OctoPack.targets against a 3.4.7 OctoPack.Tasks.dll I get the same error that you are seeing so I am wondering if your OctoPack install is getting mixed up somehow?
3.5.1 will output the OctoPack version so hopefully that will help determine what is happening.