"Invalid version string"


We are setting up an automated deployment using Octopus and AWS Auto Scaling.

One of the Octopus projects/autoscaling groups works fine.

The other, returns an “Invalid version string 1.2.5,194” on the boot up deployment. If I create/deploy a new release in the Octopus GUI, everything deploys properly. Then I am able to also run the octo.exe command that filed at boot. I realize the problem is the comma in the version string, but I can’t quite figure out where it’s coming from.

Here’s my octo.exe command:
./octo create-release --server=http://octopus01.DOMAIN.com/ --apiKey=API-KEYGOESHERE --project=“DOMAIN Web” --deployto=“www.DOMAIN.com Production” --version i

Here’s my output:

PS C:\Program Files\Octopus Deploy> ./octo create-release --server=http://octopus01.DOMAIN.com/ --apiKey=API-KEYGOESHERE --project="DOMAIN Web" --deployto="www.DOMAIN.com Production" --version 1.2.i
Octopus Deploy Command Line Tool, version

Handshaking with Octopus server: http://octopus01.DOMAIN.com/
Handshake successful. Octopus version:; API version: 3.0.0
Finding project: DOMAIN Web
Finding deployment process for project:
Finding release template...
Resolving NuGet package versions...
Finding latest NuGet package for step: Deploy Code
Release plan for release:    1.2.i
  #   Name          Version         Source
  --- ------------- --------------- ------------------------------------
  1   Deploy Code   1.2.5193.27449  Latest available in NuGet repository

Creating release...
Error from Octopus server (HTTP 500): Octopus Server returned an error: Invalid version string 1.2.5,194
Parameter name: version
Server exception:
System.ArgumentException: Invalid version string 1.2.5,194
Parameter name: version
   at Octopus.Platform.Model.SemanticVersion.Parse(String version, Boolean preserveMissingComponents) in c:\TeamCity\bui
ldAgent\work\1116bd9da9e239fd\source\Octopus.Platform\Model\SemanticVersion.cs:line 93
   at Octopus.Server.Web.Api.Rules.ReleaseNumberSupportsMasksAndMustBeUniqueRule.AfterMapBeforeStore(Object model, Objec
t resource, ISpecialRuleContext context) in c:\TeamCity\buildAgent\work\1116bd9da9e239fd\source\Octopus.Server\Web\Api\R
ules\ReleaseNumberSupportsMasksAndMustBeUniqueRule.cs:line 47
   at Octopus.Platform.Web.Api.Responder`1.ExecuteRules[TRule](Action`2 ruleCallback) in c:\TeamCity\buildAgent\work\111
6bd9da9e239fd\source\Octopus.Platform.Web\Api\Responder.cs:line 198
   at Octopus.Platform.Web.Api.CreateResponseDescriptor`2.Responder.Execute() in c:\TeamCity\buildAgent\work\1116bd9da9e
239fd\source\Octopus.Platform.Web\Api\CreateResponseDescriptor.cs:line 46
   at Octopus.Platform.Web.Api.Responder`1.Respond(TDescriptor options, NancyContext context) in c:\TeamCity\buildAgent\
work\1116bd9da9e239fd\source\Octopus.Platform.Web\Api\Responder.cs:line 176
   at System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2)
   at CallSite.Target(Closure , CallSite , Object , Object , NancyContext )
   at Octopus.Server.Web.Api.OctopusRestApiModule.<>c__DisplayClass5.<.ctor>b__2(Object o) in c:\TeamCity\buildAgent\wor
k\1116bd9da9e239fd\source\Octopus.Server\Web\Api\OctopusRestApiModule.cs:line 47
   at CallSite.Target(Closure , CallSite , Func`2 , Object )
   at Nancy.Routing.Route.<>c__DisplayClass4.<Wrap>b__3(Object parameters, CancellationToken context)

Exit code: -7

Hi Doug,

It looks like we are using culture-sensitve formatting when writing out the incremented version (5,194 should just be 5194); I’ve raised an issue for it at https://github.com/OctopusDeploy/Issues/issues/793 and will get the fix into 2.4.

In the interim, you’ll need to specify a full version (without i placeholder) when creating releases.


You guys are awesome!