No package version was specified for the step: REST API change from 2.3 to 2.5?

Hi,

I created an utility for Octopus deployment automation and it works fine for a long time until Octopus was upgraded from 2.3 to 2.5.

Error is: *There was a problem with your request. - No package version was specified for the step *

Stack Trace

    at Octopus.Client.OctopusClient.DispatchRequest[TResponseResource](OctopusRequest request, Boolean readResponse) in y:\work\refs\heads\master\source\Octopus.Client\OctopusClient.cs:line 428
   at Octopus.Client.OctopusClient.Create[TResource](String path, TResource resource) in y:\work\refs\heads\master\source\Octopus.Client\OctopusClient.cs:line 141
   at Octopus.Client.OctopusRepository.BasicRepository`1.Create(TResource resource) in y:\work\refs\heads\master\source\Octopus.Client\OctopusRepository.cs:line 231
   at OctopusDeploymentConsole.Program.CreateProjectRelease(OctopusRepository repository, String newVersion, ProjectResource project, PackageResource packageResource) in c:\TestAutoOctopus\OctopusDeploymentConsole\Program.cs:line 185
   at OctopusDeploymentConsole.Program.ProcessProject(ProjectResource projectResource, OctopusRepository repository) in c:\TestAutoOctopus\OctopusDeploymentConsole\Program.cs:line 110

Code that throws the exception:

   private static ReleaseResource CreateProjectRelease(OctopusRepository repository, string newVersion, ProjectResource project,
            PackageResource packageResource)
        {
            ReleaseResource releaseResource = repository.Releases.Create(new ReleaseResource(newVersion,
                project.Id)
            {
                SelectedPackages =
                    new List<SelectedPackage>
                    {
                        new SelectedPackage(packageResource.Id, newVersion)
                    },
                ReleaseNotes = string.Format("Created by OctopusDeploymentConsole tool on {0}", DateTime.Now)
            });
            return releaseResource;
        }

Could you give me a clue what i should change in the code/project/Octopus configuration?

Thanks,
Anthony

Hi Anthony,

Thanks for getting in touch! We believe the change might be instead of using packageResource.Id it would now be looking for the step name to reference the package.

Sorry for the trouble this has caused.
Vanessa

Hi Vanessa,
thanks you for your answer. Now it works.

Anthony