The "Exec" task needs a command to execute.
When I built my Visual Studio 2010, based project I got the above error without any clue. Then I realized that the Exec task is a MSBuild task that is trying to execute something and that something is NullorEmpty. When I inspect the Post build settings of the project, there seemed to be a new line character in it (which is not visible ). The Exec task is trying to execute a new line in the command prompt and fails. When I cleared it, things started to work ok