Currently, I have the following MSBuild command:
msbuild
/t:Build
/p:Configuration=Release
/p:OutputPath=C:\\MySolutionOutput\\
MySolutio
When building a solution using msbuild, it internally transforms the solution into an msbuild xml file which builds all projects and passes properties like OutputPath to it, and afaik there isn't a way to interfere with how this behaves. One possible solution does require you to write msbuild files yourself, but the modifications are really minor. You don't mention which project type you're using but the principle is the same for any type, and here's a sample for C# projects:
msbuild file, say outputpath.props
:
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<OutputPath Condition="'$(OutputPathBaseDir)' != ''">$(OutputPathBaseDir)\$(MSBuildProjectName)\</OutputPath>
</PropertyGroup>
</Project>
import in each project; here I am using a relative path but you could reference eg $(SolutionDir) etc; for c# projects, insert this line right before the one shown
<Import Project="..\outputpath.props" />
<!--the below is an existing line in every c# project-->
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
now build:
msbuild mysolution.sln /p:OutputPathBaseDir=C:\MySolutionOutput