This is a very old question, and the questionnaire probably sorted out their problem a long time ago, but here anyway:
MSBuild tasks in TeamCity require a command line related to MSBuild.exe, in particular, IIRC.
That is, TeamCity executes MSBuild.exe with the parameters that you specified as follows:
msbuild.exe ProjectName.deploy.cmd /y /M:https:
Of course, MSbuild does not know what these switches are, and will not be able to process "ProjectName.deploy.cmd" as an MSBuild file.
source share