Working on web deployment(http://cakebuild.net/api/Cake.WebDeploy/).
Faced the below issue
An error occurred when executing task 'Deploy'. Error: Could not connect to the remote computer ("net1-7103"). On the remote computer, make sure that Web Deploy is installed and that the required process ("Web Management Service") is started. Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_DESTINATION_NOT_REACHABLE.
Note: Web management service is started and Web deploy is also installed
Machine details:Windows 10 64 bit here is my code
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;
}