I deleted a BizTalk SendPort from the EDI agreement, but when trying to delete the same SendPort from the EDI Party, got the cryptic error: “Sequence contains no elements”.
I had been doing a proof of concept with Role Links, and turned out that I still had the roles enlisted. I found that out when I tried to delete the SendPort in the application.
So you have to unbind/unenlist the SendPort from the RoleLinks before removing the SendPort from the Party.