好的构建代码并在详细构建期间通过上下文菜单上的发布选项从VS中提取命令详细信息已清理它,提取命令我将命令带到我的构建服务器,这恰好与我的测试相同此刻的网络框并更改了路径。
Team services 中的 MSBuild 使用参数“/p:DeployOnBuild=true;PublishProfile=Test;DeployTarget=package”运行,因此它为每个 Web 应用程序生成一个包。
这与 VS 的方式略有不同,这意味着我必须调整源参数,所以我从命令行运行以下命令(添加格式以提高可读性)...
C:\Program Files\IIS\Microsoft Web Deploy V3\msdeploy.exe
-source:package='..\API.zip'
-dest:auto,ComputerName='https://localhost/MSDEPLOYAGENTSERVICE',UserName='MSDeployUser',Password='********',AuthType='NTLM',IncludeAcls='False'
-setParam:name='IIS Web Application Name',value='Api\MyApp'
-verb:sync
-retryAttempts=2
-disableLink:AppPoolExtension
-disableLink:ContentExtension
-disableLink:CertificateExtension
...这让我得到了以下回应...
Info: Using ID '6f5795f6-79bf-49cd-ac27-cc320e3af063' for connections to the rem
ote server.
Error: Could not complete the request to remote agent URL 'https://localhost/MSD
EPLOYAGENTSERVICE'.
Error: The underlying connection was closed: An unexpected error occurred on a s
end.
Error: Unable to read data from the transport connection: An existing connection
was forcibly closed by the remote host.
Error: An existing connection was forcibly closed by the remote host
Error count: 1.
...用指向服务器的域名(我用来远程进入盒子的那个)替换“localhost”会导致...
Info: Using ID 'b4820db6-a975-4a77-96f1-51390bcced37' for connections to the rem
ote server.
Error Code: ERROR_DESTINATION_NOT_REACHABLE
More Information: Could not connect to the remote computer ("<my domain>"). On the remote computer, make sure that Web Deploy is installed and that t
he required process ("Web Deployment Agent Service") is started. Learn more at:
http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_DESTINATION_NOT_REACHABLE.
Error: The remote server returned an error: (404) Not Found.
Error count: 1.
...奇怪,因为我可以远程访问域上的机器,但由于某种原因我无法与 MSDeploy 交谈,即使我确实从本地机器上明确地与它交谈,它似乎也不高兴。
我在这里缺少一些魔法吗?