Remove “Attachment Viewer” web resource from all the entity forms to which you had manually added them.

Once these dependencies have been removed, you can delete the attachment viewer solution from your Dynamics 365 environment.