So, I have VS 2010 installed and am in the process of modifying my MSBuild script for our TeamCity build integration. Everything is working great with one exception.
You should be able to accomplish this by using the Package target and specifying the temp directory.
msbuild solution.sln /p:Configuration=Release;DeployOnBuild=true;DeployTarget=Package;_PackageTempDir=..\publish
http://pattersonc.com/blog/index.php/2010/07/15/visual-studio-2010-publish-command-from-msbuild-command-line/