We use MSBuild quite extensively as part of our continuous integration process, and whilst it is incredibly powerful and we can do practically all of our build, test and deploym
You could also have a look at the excellent commercial app (with 14 day trial) MSBuild Sidekick at Attrice Corp to debug your MSBuild-script.