'Renaming a release in VSTS Release Management

Is it possible to rename a release that’s currently in progress or already completed?

I tried renaming the release with the syntax below but it always throws an error saying "Adding or deleting stages from the release is not allowed"

var releases = releaseClient.GetReleasesAsync(definitionId: 100, searchtext: "OldReleaseName").Result;

var release = release.FirstOrDefault();
release.Name = "new release name";

releaseClient.UpdateReleaseAsync(release, "projectName", release.Id).Wait();


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source