title: Can I package a website with a publish profile using msbuild and skip the web.config transforms?
body: <p>I have a solution of websites with three publish profiles, which we use to transform the connection strings for each target environment:</p>
  
  <ul>
  <li>Test - localhost connections, no transforms, defaults are checked in</li>
  <li>Staging - a VM environment</li>
  <li>Production - the real deal</li>
  </ul>
  
  <p>We also have some app settings that need to be transformed for each environment. So, we used regular, build-configuration-based transforms. </p>
  
  <ul>
  <li>Debug - transform settings for Staging</li>
  <li>Release - transform settings for Production</li>
  </ul>
  
  <p>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.</p>
  
  <p><strong>Is there some way to tell msbuild to package the website, using the Test profile, but to skip the config transform?</strong> Or should I restructure the build configurations around the environments? (that is, leave Debug and Release alone and create a build configuration per environment)</p>
  
  <h3>Command Line Build Statement</h3>
  
  <p>I'm building my Test configuration under the Debug solution configuration and it's definitely picking up the transformed <code>Web.Debug.config</code> file. There is no Web.Test.config  file because Test is a "publish profile" not a build configuration.</p>
  
  <pre><code>cmd&gt; msbuild websites.sln /t:Build /p:Configuration=Debug;Platform="Any CPU";DeployOnBuild=true;DeployTarget=Package;PublishProfile=Test;VisualStudioVersion=11.0
  </code></pre>
  
  <p>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.</p>