Error 500 deleting deployment step

I have a project where there are two deployment steps using the same package, when I try to delete one of them then an Error 500 is returned, detail as below

Error: 500 Server error: An error occurred while saving entities that do not expose foreign key properties for their relationships. The EntityEntries property will return null because a single entity cannot be identified as the source of the exception. Handling of exceptions while saving can be made easier by exposing foreign key properties in your entity types. See the InnerException for details.

Resolved it.
The issue was actually that there was a variable associated with the deployment step that I was attempting to remove.
Delete the variable first and I can delete the deployment step

Hi Bruce,

Glad you got it sorted. I’ll make sure that in the next release these kinds of cascading delete rules are solved once and for all. I’ve been writing up plans for this here:

https://octopus.atlassian.net/wiki/display/specs/Cascading+deletes

Paul

Had the same issue. Glad to see there’s a workaround available.