AutomationTool was unable to run successfully

Packaging error: AutomationTool was unable to run successfully.

How can we solve this?