Could not publish solution due to Ribbon Control Dependancies

When publish a solution you may receive a dependency check that indicates a missing control:
<ErrorCode>-2147159801</ErrorCode>

The ribbon item 'xxx.Hide' is dependent on ribbon control id='yyy'.

A common cause of this issue is where a control has been deleted but the a corresponding hide action has not been deleted. The difficult thing about this error is that it will not show up the first time you publish, but only on subsequent publishes. Furthermore, even after deleting the element in question, the solution will still not publish. The same result would happen if you deleted a Group/Flyout that contains a child control that had a an associate Hide Action.

Solution
1. Locate the Ribbon Item (e.g. Hide Action) in your solution that has the ID given (xxx in the example above) - and remove it not already.
2. Re-create a button with the same ID given in the error message (yyy in the example above). It doesn't have to have any other properties (images/commands) - just the same ID on the same entity ribbon as before.
3. Publish


Feedback and Knowledge Base