AutomationTool was unable to run successfully

Packaging error: AutomationTool was unable to run successfully.

How to solve this?