Scenario 1: Other solution is no longer needed
If the other solution mentioned in the error message is no longer needed, delete that solution first and then try again.
In the example in the Cause section, deleting Solution B would allow you to successfully delete Solution A.
Scenario 2: Other solution is needed
If the other solution mentioned in the error message is still needed and cannot be removed, the solution would need to be updated to remove the dependencies to the solution you are trying to delete. If you created this solution, you can follow the steps below to remove the dependency and deploy it as an upgrade. The steps below are the steps you would follow in the example scenario described in the Cause section.
1. In the source environment where Solution B was created, update Solution B to remove the reference to the custom security role:
a. Access the source environment as a user with the System Administrator or System Customizer security role.
b. Navigate to Settings and then click Solutions.
c. Open the other solution mentioned in the error message (Solution B).
d. In the Version field, increase the version number.
e. On the left side of the page, locate the component and then remove it. In the example provided, you would click Security Roles, select the custom security role, and then click Remove.
f. Click Save and then click Publish All Customizations.
2. Click Export Solution and choose to export the solution as Managed.
3. In the target environment (the organization where you encountered the error), import the updated solution (Solution B):
a. Access the target environment as a user with the System Administrator or System Customizer security role.
b. Navigate to Settings and then click Solutions.
c. Click Import and browse to the updated solution file you exported.
d. Click Next. You will see a notice that "This solution package contains an update for a solution that is already installed".
e. Click Next and select the Stage for upgrade checkbox.
f. Click Import.
g. After the import completes, click Apply Solution Upgrade. NOTE: If you closed the import dialog without clicking Apply Solution Upgrade, you can select the solution in the Solutions list and then click Apply Solution Upgrade.
4. Now that the dependency has been removed from Solution B, try to delete solution A again.