title: Using MSDeploy for deploy of console application to a DMZ server
body: <p>I am trying to deploy a console application to a folder on a DMZ server using autodeploy with MSBuild and Team Foundation Server. </p>
  
  <p>I am already deploying multiple sites to that same server and it works great. I have tried multiple ways but the files are not deployed.</p>
  
  <p>First, I tried to deploy the console app in the same way as i do for my web site, ie:</p>
  
  <pre><code>&lt;MSBuild
      Projects="$(SolutionRoot)\MySolution.sln"
      Properties="AllowUntrustedCertificate=True;AuthType=Basic;
      Configuration=DEBUG;CreatePackageOnPublish=True;                                
      DeployIisAppPath=Default Website/dummy.dev.myapp;
      DeployOnBuild=True;DeployTarget=MsDeployPublish;
      MSDeployPublishMethod=WMSvc;
      MsDeployServiceUrl=https://xxx.xxx.xxx.xxx:8172/MsDeploy.axd;
      UserName=userid;Password=password;UseMsdeployExe=True"
  /&gt;
  </code></pre>
  
  <p>Without success. </p>
  
  <p><em>EDIT: No error message is returned. It all seems to go well.</em></p>
  
  <p>Then, I also tried to deploy the console app as follows:</p>
  
  <pre><code>&lt;Exec Command="&amp;quot;C:\Program Files\IIS\Microsoft Web Deploy V2\MSDeploy.exe&amp;quot; 
                  -verb:sync 
                  -source:contentpath=&amp;quot;$(OutDir)\MyApp.Precompiled&amp;quot; 
                  -dest:contentpath=&amp;quot;D:\dev.myapp&amp;quot;,computername=xxx.xxx.xxx.xxx,username=userid,password=password" 
                  ContinueOnError="false" /&gt;
  </code></pre>
  
  <p>I actually also tried with computername as <code>https://xxx.xxx.xxx.xxx:8172/MsDeploy.axd</code>.</p>
  
  <p><em>EDIT:  The following is what I got.
  EXEC: FileOrFolderNotFound
   EXEC: Object of type 'contentPath' and path 'E:\Builds\1...\dev.myapp' cannot be created.
   EXEC: The path '\?\E:\Builds\1...\dev.myapp' is not valid.
   EXEC: 1.
   E:\Builds\1...\BuildType\Targets\Deploy.targets (142): The command ""C:\Program Files\IIS\Microsoft Web Deploy V2\MSDeploy.exe" -verb:sync -source:contentpath="E:\Builds\1...\dev.myapp" -dest:contentpath="D:\dev.myapp",computername=https://xxx.xxx.xxx.xxx:8172/MsDeploy.axd,username=userid,password=password" exited with code -1.
  I realize I haven't read all of the error, Do I really need an UNC path?</em></p>
  
  <p>Does anyone know how to do this?</p>