I had to reinstall Octopus for a few reasons, in order not to lose any work done, I’ve exported my only project to a JSON file but now I’ve a problem importing it back.
both versions were the latest (Octopus 3.3.9)
C:\rxtfs>octo import --server=http://localhost/api --apiKey=API-3PJ8LQVDTQBRUFJR
XXJPQURE --type=project --filePath=“C:\rxtfs\ocProject.json”
Octopus Deploy Command Line Tool, version 3.3.11+Branch.master.Sha.9fe1e5688698d
749fe85e52e3f7be7c98249f194
Handshaking with Octopus server: http://localhost/api
Handshake successful. Octopus version: 3.3.9; API version: 3.0.0
Authenticated as: pedro <>
Finding importer ‘project’
Validating the import
Export file successfully loaded
Newtonsoft.Json.JsonSerializationException: Unable to find a constructor to use
for type Octopus.Client.Model.PropertyValueResource. A class should either have
a default constructor, one constructor with arguments or a constructor marked wi
th the JsonConstructor attribute. Path ‘DeploymentProcess.Steps[0].Actions[0].Pr
operties.Password.HasValue’, line 1, position 2890.
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateNewObject
(JsonReader reader, JsonObjectContract objectContract, JsonProperty containerMem
ber, JsonProperty containerProperty, String id, Boolean& createdFromNonDefaultCr
eator)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(Js
onReader reader, Type objectType, JsonContract contract, JsonProperty member, Js
onContainerContract containerContract, JsonProperty containerMember, Object exis
tingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInte
rnal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty mem
ber, JsonContainerContract containerContract, JsonProperty containerMember, Obje
ct existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateDiction
ary(IDictionary dictionary, JsonReader reader, JsonDictionaryContract contract,
JsonProperty containerProperty, String id)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(Js
onReader reader, Type objectType, JsonContract contract, JsonProperty member, Js
onContainerContract containerContract, JsonProperty containerMember, Object exis
tingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInte
rnal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty mem
ber, JsonContainerContract containerContract, JsonProperty containerMember, Obje
ct existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValu
e(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract
containerContract, JsonProperty containerProperty, JsonReader reader, Object tar
get)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(
Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty m
ember, String id)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(Js
onReader reader, Type objectType, JsonContract contract, JsonProperty member, Js
onContainerContract containerContract, JsonProperty containerMember, Object exis
tingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInte
rnal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty mem
ber, JsonContainerContract containerContract, JsonProperty containerMember, Obje
ct existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateList(IL
ist list, JsonReader reader, JsonArrayContract contract, JsonProperty containerP
roperty, String id)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateList(Json
Reader reader, Type objectType, JsonContract contract, JsonProperty member, Obje
ct existingValue, String id)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInte
rnal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty mem
ber, JsonContainerContract containerContract, JsonProperty containerMember, Obje
ct existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValu
e(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract
containerContract, JsonProperty containerProperty, JsonReader reader, Object tar
get)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(
Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty m
ember, String id)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(Js
onReader reader, Type objectType, JsonContract contract, JsonProperty member, Js
onContainerContract containerContract, JsonProperty containerMember, Object exis
tingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInte
rnal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty mem
ber, JsonContainerContract containerContract, JsonProperty containerMember, Obje
ct existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateList(IL
ist list, JsonReader reader, JsonArrayContract contract, JsonProperty containerP
roperty, String id)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateList(Json
Reader reader, Type objectType, JsonContract contract, JsonProperty member, Obje
ct existingValue, String id)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInte
rnal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty mem
ber, JsonContainerContract containerContract, JsonProperty containerMember, Obje
ct existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValu
e(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract
containerContract, JsonProperty containerProperty, JsonReader reader, Object tar
get)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(
Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty m
ember, String id)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(Js
onReader reader, Type objectType, JsonContract contract, JsonProperty member, Js
onContainerContract containerContract, JsonProperty containerMember, Object exis
tingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInte
rnal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty mem
ber, JsonContainerContract containerContract, JsonProperty containerMember, Obje
ct existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValu
e(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract
containerContract, JsonProperty containerProperty, JsonReader reader, Object tar
get)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(
Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty m
ember, String id)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(Js
onReader reader, Type objectType, JsonContract contract, JsonProperty member, Js
onContainerContract containerContract, JsonProperty containerMember, Object exis
tingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInte
rnal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty mem
ber, JsonContainerContract containerContract, JsonProperty containerMember, Obje
ct existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(Jso
nReader reader, Type objectType, Boolean checkAdditionalContent)
at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type
objectType)
at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, Jso
nSerializerSettings settings)
at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSeriali
zerSettings settings)
at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value)
at Octopus.Cli.Importers.FileSystemImporter.Import[T](String filePath, String
entityType)
at Octopus.Cli.Importers.ProjectImporter.Validate(Dictionary`2 paramDictionar
y)
at Octopus.Cli.Importers.BaseImporter.Validate(String[] parameters)
at Octopus.Cli.Commands.ImportCommand.Execute()
at Octopus.Cli.Commands.ApiCommand.Execute(String[] commandLineArguments)
at Octopus.Cli.Program.Main(String[] args)
Exit code: -3
ocProject.json (28 KB)