I’ve just set up TC plug-in for first time on a fairly vanilla set up. I already have my packages being created in TeamCity using NuGet command lines and I can create releases and deploy them manually successfully.
I wanted to automatically create the release and deploy it to a ‘Latest’ environment using the ‘Create Release’ step in TC. This is failing, complaining about an unexpected < character:
@@@
[19:38:13]Skip checking for changes - there are no VCS roots defined
[19:38:13]Publishing internal artifacts
[19:38:14][Publishing internal artifacts] Sending build.start.properties.gz file
[19:38:13]Clearing temporary directory: C:\TeamCity\buildAgent\temp\buildTmp
[19:38:13]Checkout directory: C:\TeamCity\buildAgent\work\532794d203990edb
[19:38:13]Step 1/1: OctopusDeploy: Create release
[19:38:13][Step 1/1] Octopus Deploy
[19:38:13][Octopus Deploy] Running command: octo.exe create-release --server http://localhost:83/app#/ --apikey SECRET --project SimpleTalk --enableservicemessages --version 1.0.217 --deployto Latest --waitfordeployment
[19:38:13][Octopus Deploy] Creating Octopus Deploy release
[19:38:14][Octopus Deploy] Octopus Deploy Command Line Tool, version 2.4.9.22
[19:38:14][Octopus Deploy]
[19:38:14][Octopus Deploy] Handshaking with Octopus server: http://localhost:83/app#/
[19:38:14][Octopus Deploy] Newtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: <. Path ‘’, line 0, position 0.
[19:38:14][Octopus Deploy] at Newtonsoft.Json.JsonTextReader.ParseValue()
[19:38:14][Octopus Deploy] at Newtonsoft.Json.JsonTextReader.ReadInternal()
[19:38:14][Octopus Deploy] at Newtonsoft.Json.JsonTextReader.Read()
[19:38:14][Octopus Deploy] at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ReadForType(JsonReader reader, JsonContract contract, Boolean hasConverter)
[19:38:14][Octopus Deploy] at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
[19:38:14][Octopus Deploy] at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
[19:38:14][Octopus Deploy] at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
[19:38:14][Octopus Deploy] at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings)
[19:38:14][Octopus Deploy] at Octopus.Client.OctopusClient.DispatchRequest[TResponseResource](OctopusRequest request, Boolean readResponse)
[19:38:14][Octopus Deploy] at Octopus.Client.OctopusClient.Get[TResource](String path, Object pathParameters)
[19:38:14][Octopus Deploy] at Octopus.Client.OctopusClient.EstablishSession()
[19:38:14][Octopus Deploy] at System.Lazy1.CreateValue() [19:38:14][Octopus Deploy] at System.Lazy
1.LazyInitValue()
[19:38:14][Octopus Deploy] at System.Lazy`1.get_Value()
[19:38:14][Octopus Deploy] at Octopus.Client.OctopusClient.get_RootDocument()
[19:38:14][Octopus Deploy] at OctopusTools.Commands.ApiCommand.Execute(String[] commandLineArguments)
[19:38:14][Octopus Deploy] at OctopusTools.Program.Main(String[] args)
[19:38:14][Octopus Deploy] Exit code: -3
[19:38:14][Octopus Deploy] Octo.exe exit code: -3
[19:38:14][Step 1/1] Unable to create or deploy release. Please check the build log for details on the error.
[19:38:14][Step 1/1] Step OctopusDeploy: Create release failed
[19:38:14]Publishing internal artifacts
[19:38:14][Publishing internal artifacts] Sending build.finish.properties.gz file
[19:38:14]Build finished
@@@
Any ideas?