Additionally after some further fiddling, I believe that msbuild
doesn't like spaces in it's switches
For example this will fail:
msbuild $sln_file "/nologo /t:Rebuild" "/p:Configuration=Release" "/
p:OutDir=""$release_dir"""
MSBUILD : error MSB1001: Unknown switch.
Switch: /nologo /t:Rebuild
Whereas this will not:
msbuild $sln_file "/nologo" "/t:Rebuild" "/p:Configuration=Release" "/
p:OutDir=""$release_dir"""
A bit of a weird one, but it seems to work just fine for me now.