I am trying to create a release for a project (no nuget package). but I have encountering an issue “Index was outside the bounds of the array”.
It seems like I have to have a nuget package in order to create release using octopus.client?
Below are my powershell script:
…
$process = $repository.DeploymentProcesses.Get($project.DeploymentProcessId)
$channel = $repository.Channels.FindByName($project,“Default”)
$template = $repository.DeploymentProcesses.GetTemplate($process,$channel)
#create a connection to the Octopus Server using API-key
$octopusURI = “my octopus server url”
$apiKey = ‘my API key’
$endpoint = new-object Octopus.Client.OctopusServerEndpoint $octopusURI, $apiKey
#use the connection to access the Octopus Server repository
$repository = new-object Octopus.Client.OctopusRepository $endpoint
I have the feeling that this isn’t working because that version of the Octopus.Client and the Octopus Server are not compatible. I’d try with version 3.12.0 of the Octopus.Client: https://www.nuget.org/packages/Octopus.Client/4.12.0
Or even better, if you can upgrade your Octopus Server to the latest and keep using the Octopus.Client you are currently on.