title: Jenkins - MSBuild Web Deploy creating zip instead of deploying
body: <p>I am having an issue with getting Jenkins to use MSBuild correctly and deploy my built website to the web server.</p>
  
  <p>I have thus far created the web site in Visual Studio 2012 and have used the wizard within to create a publishing profile that will successfully publish to my web server. I have then used the command line version of MSBuild on the same PC to test that the command line arguments work correctly...they do! From this I have then added a build step into Jenkins for MSBuild pointing to the same .sln file and using the same arguments but for some reason it doesn't do a web deploy as expected, it just creates a zip file. I cannot see anything that tells it that it should package it like this and am going a little mad.</p>
  
  <p>The publishing profile that VS created (and I am using) is below:</p>
  
  <pre><code>    &lt;Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"&gt;
    &lt;PropertyGroup&gt;
      &lt;WebPublishMethod&gt;MSDeploy&lt;/WebPublishMethod&gt;
      &lt;LastUsedBuildConfiguration&gt;Release&lt;/LastUsedBuildConfiguration&gt;
      &lt;LastUsedPlatform&gt;Any CPU&lt;/LastUsedPlatform&gt;
      &lt;SiteUrlToLaunchAfterPublish /&gt;
      &lt;ExcludeApp_Data&gt;False&lt;/ExcludeApp_Data&gt;
      &lt;MSDeployServiceURL&gt;http://10.215.134.184/msdeployagentservice&lt;/MSDeployServiceURL&gt;
      &lt;DeployIisAppPath&gt;Default Web Site/mvcCPE&lt;/DeployIisAppPath&gt;
      &lt;RemoteSitePhysicalPath /&gt;
      &lt;SkipExtraFilesOnServer&gt;True&lt;/SkipExtraFilesOnServer&gt;
      &lt;MSDeployPublishMethod&gt;RemoteAgent&lt;/MSDeployPublishMethod&gt;
      &lt;EnableMSDeployBackup&gt;False&lt;/EnableMSDeployBackup&gt;
      &lt;UserName&gt;Administrator&lt;/UserName&gt;
      &lt;_SavePWD&gt;True&lt;/_SavePWD&gt;
      &lt;PublishDatabaseSettings&gt;
        &lt;Objects xmlns=""&gt;
          &lt;ObjectGroup Name="DefaultConnection" Order="1" Enabled="False"&gt;
            &lt;Destination Path="" /&gt;
            &lt;Object Type="DbDacFx"&gt;
              &lt;PreSource Path="Data Source=.\SQLEXPRESS;Initial Catalog=aspnet-mvcCPE-20130228154150;Integrated Security=True" includeData="False" /&gt;
              &lt;Source Path="$(IntermediateOutputPath)AutoScripts\DefaultConnection_IncrementalSchemaOnly.dacpac" dacpacAction="Deploy" /&gt;
            &lt;/Object&gt;
            &lt;UpdateFrom Type="Web.Config"&gt;
              &lt;Source MatchValue="Data Source=.\SQLEXPRESS;Initial Catalog=aspnet-mvcCPE-20130228154150;Integrated Security=SSPI" MatchAttributes="$(UpdateFromConnectionStringAttributes)" /&gt;
            &lt;/UpdateFrom&gt;
          &lt;/ObjectGroup&gt;
        &lt;/Objects&gt;
      &lt;/PublishDatabaseSettings&gt;
    &lt;/PropertyGroup&gt;
    &lt;ItemGroup&gt;
      &lt;MSDeployParameterValue Include="$(DeployParameterPrefix)DefaultConnection-Web.config Connection String" /&gt;
    &lt;/ItemGroup&gt;
  &lt;/Project&gt;
  </code></pre>
  
  <p>On the command line I am using the following command:</p>
  
  <pre><code>msbuild mvcCPE.sln /property:Configuration=Release /property:DeployOnBuild=True /property:PublishProfile=mvcCPE.pubxml /property:Password=xxxxxx
  </code></pre>
  
  <p>And in Jenkins I have the following:</p>
  
  <pre><code>MSBuild Version: v4.0.30319
  MSBuild Build File: C:\Program Files\Jenkins\jobs\CPE2\workspace\mvcCPE.sln
  Command Line Arguments: /property:Configuration=Release /property:DeployOnBuild=True /property:PublishProfile=mvcCPE.pubxml /property:Password=nimdasys
  </code></pre>
  
  <p>As far as I can understand from all this Jenkins should be building and deploying my site to the server but it's not. Any help is greatly appreciated (I am fairly new to Jenkins and VS).</p>