Recently faced one issue, when exporting the solution from DEV, the button XML alone is not enough, the entity must be exported with its metadata included when selecting components.
Without the metadata, the custom button definition gets imported but never shows up in the target environment. (eg. UAT)
Resolution steps:
- When adding the entity to the solution (unmanaged, DEV → other environments), make sure entity metadata is checked and included.
- Import the solution into the target environment.
- After import, run Publish Table.