Unable to create or deploy release - Bad request: Please enter a valid SemVer version number

I’m getting a problem when trying to deploy from TeamCity. I get a failed deployment and the message…

[11:44:19][Octopus Deploy] Bad request: Please enter a valid SemVer version number, for example '1.3' or '1.19.310.9000

… in the Build log. But my version number looks okay…

[11:44:19][Octopus Deploy] # Name Version Source [11:44:19][Octopus Deploy] --- ---------------------- --------------- ------------------------------------ [11:44:19][Octopus Deploy] 1 UserInterface 1.1.159.2730 Latest available in NuGet repository

Here’s the version number from my *.nuspec file. Again, everything looks okay…

<version>1.2.30.2788</version>

Any ideas? Many thanks in advance

Hi there - thanks for getting in touch.

Which version of the TeamCity plugin, and Octopus server are you running?

So late yesterday I found the problem. The Build format number for the build configuration in Team City was not set correctly. It was still set to the default value %build.counter%, when it should have been %dep.myProject.system.OctoPackPackageVersion%. Once I corrected this it deployed as intended.