Team
Severity
Not blocking, at least 1 affected customer
Version
Tested in 2021.3.8275
Latest Version
No response
What happened?
"Sequence contains more than one matching element" error when creating a release in the CLI when release versioning set to a referenced package on a step that includes a deployment package
Reproduction
Related to 7283
- Create a
Run a Script step with Inline source code
- Set a
Referenced Package
- Go to
Deployments -> Settings for the Project -> Use the version number from an included package
- Select the package from Step 2 above
- Go back to the
Run a Script step, switch to Script file inside a package, and save
- Attempt to create a release from the CLI
- Example:
octo create-release --server=http://Your_Octopus_Server --apikey=API-XXXXXXXXXXXXXXXXXXXXXXXXX --project="project_name"
Error and Stacktrace
System.InvalidOperationException: Sequence contains more than one matching element
at System.Linq.ThrowHelper.ThrowMoreThanOneMatchException()
at System.Linq.Enumerable.SingleOrDefault[TSource](IEnumerable`1 source, Func`2 predicate)
at Octopus.Cli.Commands.Releases.ReleasePlan.GetActionVersionNumber(String packageStepName, String packageReferenceName)
at Octopus.Cli.Commands.Releases.CreateReleaseCommand.Request()
at Octopus.Cli.Commands.ApiCommand.Execute()
at Octopus.Cli.Commands.ApiCommand.Execute(String[] commandLineArguments)
at Octopus.Cli.CliProgram.Run(String[] args)
Exit code: -3
More Information
No response
Workaround
Create a release via the Octopus Server UI rather than the CLI
or
Create a placeholder step such as the example below:



Team
Severity
Not blocking, at least 1 affected customer
Version
Tested in 2021.3.8275
Latest Version
No response
What happened?
"Sequence contains more than one matching element" error when creating a release in the CLI when release versioning set to a referenced package on a step that includes a deployment package
Reproduction
Related to 7283
Run a Scriptstep withInline source codeReferenced PackageDeployments->Settingsfor the Project ->Use the version number from an included packageRun a Scriptstep, switch toScript file inside a package, and saveocto create-release --server=http://Your_Octopus_Server --apikey=API-XXXXXXXXXXXXXXXXXXXXXXXXX --project="project_name"Error and Stacktrace
More Information
No response
Workaround
Create a release via the Octopus Server UI rather than the CLI
or
Create a placeholder step such as the example below:
