从事网络部署(http://cakebuild.net/api/Cake.WebDeploy/)。
面临以下问题
执行任务“部署”时发生错误。错误:无法连接到远程计算机(“net1-7103”)。在远程计算机上,确保安装了 Web Deploy 并且启动了所需的进程(“Web 管理服务”)。了解更多信息:http: //go.microsoft.com/fwlink/ ?LinkId=221672#ERROR_DESTINATION_NOT_REACHABLE 。
注意: Web管理服务已启动,Web deploy也已安装
机器详细信息:Windows 10 64 位 这是我的代码
Task("Deploy")
.IsDependentOn("Build")
.Description("Deploy build website")
.Does(() =>
{
DeployWebsite(new DeploySettings()
{
SourcePath = "./Examplesite/obj/Release/Package/Examplesite.CI.MVCApp.zip",
SiteName = "BuildAuto",
Port=8082,
ComputerName = "NET1-7103",
Username = "labuser",
Password = "*****"
});
});
Task("build")
.IsDependentOn("Restore-NuGet-Packages")
.Does(() =>
{
try {
MSBuild(currentDirectoryAppInfo + @"\Examplesite.CI.MVCApp.sln", new MSBuildSettings()
.SetConfiguration(configuration)
.WithProperty("DeployOnBuild","true")
.SetVerbosity(Verbosity.Minimal));
}
catch(Exception ex) {
buildStatus = false;
}