0
votes

I have a TFS 2013 build that I'm trying to get to publish to a folder on the build server. I've installed WebDeploy, but I always get the error:

C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\Web\Microsoft.Web.Publishing.targets (4274): Web deployment task failed. (Could not connect to the remote computer ("localhost"). 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.)

I've set up a website on the build server and that's where I'm trying to publish the website. Actually I don't even care about publishing it per se - I just need my build output to go to a folder locally automatically. Right now we have to manually open the solution and choose Publish... to get the output that subsequent InstallShield builds need for input. Here are my MSBuild arguments. Does anyone have any idea what could be missing?

/p:SrcDir=C:\Builds\TFS\WebApps\Src
/p:RevKeyname=WebAppsRevNr 
/p:DeployOnBuild=true 
/p:DeployTarget=MsDeployPublish
/p:MSDeployServiceURL=https://127.0.0.1:8172/msdeploy.axd 
/p:CreatePackageOnPublish=True  
/p:DeployIisAppPath="WebApp" 
/p:MsDeployPublishMethod=WMSVC 
/p:AllowUntrustedCertificate=True
/p:AutoParameterizationWebConfigConnectionStrings=False 
/p:Authtype=NTLM /p:username=""

I've checked both net start wmsvc and net start msdepsvc and both are running. Any ideas?

Thanks!

UPDATE I've tried everything that Andy suggested and now when I run this from the command line I get this bizarre error message:

"C:\Workspace\VS2013\WebApps\Main\Src\webapps.sln" (default target) (1) ->
 "C:\Workspace\VS2013\WebApps\Main\Src\CoreWebApps\CoreWebApps.csproj" 
 (default
target) (7) ->
(AutoParameterizationWebConfigConnectionStringsCore target) ->
  C:\Program Files 
(x86)\MSBuild\Microsoft\VisualStudio\v14.0\Web\Microsoft.Web
.Publishing.targets(2295,5): error : Could not open Source file: Could not 
find
 a part of the path 
'C:\Workspace\VS2013\WebApps\Main\Src\CoreWebApps\Areas\Adm
in\Views\Web.config;Areas\Admin\Views\Web.config'. 
[C:\Workspace\VS2013\WebApps
\Main\Src\CoreWebApps\CoreWebApps.csproj] 

Any idea why it's looking for Web.config;Areas\Admin\Views\Web.config'.? That makes no sense.

1

1 Answers

0
votes

Please try below items to narrow down the issue:

  • Try to use IP or Machine Name instead of "localhost"
  • Logon your build agent machine, then manually execute the same MSBuild command within the same arguments(which you provided in build definition) to build and deploy your solution, then check result. You need to ensure you can manually run the same MSBuild command within deploy argument to build and deploy your solution successfully from build agent machine. Then use the same deploy arguments in TFS Build definition.
  • Double check Web Deploy settings to make sure that the name of the website is exactly that of what's in IIS.
  • Install Web Management Tools before Web Deploy : Install the Web Management Services (Roles -> Web Server > Management Tools > Management Services). Then uninstall Web Deploy, and then install Web Deploy again.

You can also reference this thread for your troubleshooting.


Update:

For the issue "Could not open Source file: Could not find a part of the path" you can reference below similar articles for the troubleshooting.