Using MSDeploy for deploy of console application to a DMZ server
msbuild, msdeploy, tfs, tfsbuild
Solution
I finally found out how to make it work.
<Exec Command=""C:\Program Files\IIS\Microsoft Web Deploy V2\MSDeploy.exe"
-verb:sync
-source:contentpath="$(OutDir)\MyApp.Precompiled"
-dest:contentpath="D:\dev.myapp",computername=https://xxx.xxx.xxx.xxx:8172/MsDeploy.axd,username=userid,password=password,authtype=Basic
-allowUntrusted=True"
ContinueOnError="false" />
I changed computername to computername=https://xxx.xxx.xxx.xxx:8172/MsDeploy.axd, added authtype=Basic and allowUntrusted=True and voila it worked.
It was quite frustrating not having any kind of feedback of what went wrong with the first option. But when I was using the second alternative I got feedback to work with.
If anyone know how to make this work using the MSBuild task, please feel free to enlighten me.
Problem
I am trying to deploy a console application to a folder on a DMZ server using autodeploy with MSBuild and Team Foundation Server. 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. First, I tried to deploy the console app in the same way as i do for my web site, ie: ``` <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" /> ``` Without success. EDIT: No error message is returned. It all seems to go well. Then, I also tried to deploy the console app as follows: ``` <Exec Command=""C:\Program Files\IIS\Microsoft Web Deploy V2\MSDeploy.exe" -verb:sync -source:contentpath="$(OutDir)\MyApp.Precompiled" -dest:contentpath="D:\dev.myapp",computername=xxx.xxx.xxx.xxx,username=userid,password=password" ContinueOnError="false" /> ``` I actually also tried with computername as `https://xxx.xxx.xxx.xxx:8172/MsDeploy.axd`. 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? Does anyone know how to do this?