Debugging MSBuild script with Visual Studio - The Visual Studio Blog -