If you want to call msbuild with arguments from psake without getting errors like “MSB1008: Only one project can be specified”, you’ll have to do some quoting:

exec {msbuild "/verbosity:quiet" "/p:WarningLevel=4;OutDir=$build\\" "/t:Clean,Build" MySolution.sln }