I have a solution of websites with three publish profiles, which we use to transform the connection strings for each target environment:
- Test - localhost connections, no transforms, defaults are checked in
 - Staging - a VM environment
 - Production - the real deal
 
We also have some app settings that need to be transformed for each environment. So, we used regular, build-configuration-based transforms.
- Debug - transform settings for Staging
 - Release - transform settings for Production
 
This leaves us in a pickle when we try to package the Test profile. We package it so the testers can deploy on their systems from build artifacts instead of source code. But, the Test package picks up the Debug app settings transforms.
Is there some way to tell msbuild to package the website, using the Test profile, but to skip the config transform? Or should I restructure the build configurations around the environments? (that is, leave Debug and Release alone and create a build configuration per environment)
Command Line Build Statement
I'm building my Test configuration under the Debug solution configuration and it's definitely picking up the transformed Web.Debug.config file. There is no Web.Test.config  file because Test is a "publish profile" not a build configuration.
cmd> msbuild websites.sln /t:Build /p:Configuration=Debug;Platform="Any CPU";DeployOnBuild=true;DeployTarget=Package;PublishProfile=Test;VisualStudioVersion=11.0
Maybe I'm doing something wrong here. I do feel like the Config/Platform are redundant, since I provide those in the Publish Profile dialog, as well. The Visual Studio Version was a surprise to me, but necessary to produce the zip package.