This is a more generic version of this question: How to run a build step on a specific branch only?
For example, I can use a PowerShell script to run MSBuild if '%teamcity.build.branch.is_default%' -eq 'true'
or if '%teamcity.build.branch%' -eq 'master'
but then I will miss the collapsible log that comes with the TeamCity MSBuild build runner. Isn't there any easier way to conditionally run a build step?