What does the error "the exec task needs a command to execute" mean?
C#.NetExceptionCompiler ConstructionC# Problem Overview
When compiling a project in Visual Studio, the error message "the exec task needs a command to execute" appears, with no line number. What does this error mean?
(Apologies for asking and answering my own question; I just found an answer as I was writing this. Have made it community wiki, so as not to offend.)
C# Solutions
Solution 1 - C#
Ken Egozi has found an answer.
The message is caused by stray newline characters in pre or post build commands.
Solution 2 - C#
That link is no longer good.
HERE is a new link.
And here is a pertinent quote from the blog:
"After pooling out a few hairs, I remembers that I recently have edited the pre-build actions for this project.
Looking this up, I found that I left a spare newline at the end of the pre-build script. So VS2005 sent msbuild an order to run an empty command."