IIS WebDeploy using MS Build Fails with error MSB4044 -ConcatFullServiceUrlWithSiteName task

msbuild, msdeploy, visual-studio-2012

Solution

After much googling, and finally comparing a project that would deploy with the one that wouldn't, I finally figured it out after I opened the .csproj files with a text editor and compared them. In the project that worked, I found this section:

<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">

And it had this line:

<DeployIisAppPath>Default Web Site/sitenamehere</DeployIisAppPath>

I added this same line to the non-working project, changed the sitename, and it worked. Hope this helps someone else.

Problem

In setting up a Jenkins deployment job, I kept running into this error when trying to deploy a Visual Studio 2012 Web project via the command line. error MSB4044: The "ConcatFullServiceUrlWithSiteName" task was not given a value for the required parameter "SiteAppName" For reference, here are the parameters that I used: ``` /p:Configuration=Release /t:Rebuild /p:VisualStudioVersion=11.0 /p:PublishProfile="DeployToDevServer" /p:DeployOnBuild=True /p:DeployTarget=MSDeployPublish /P:AllowUntrustedCertificate=True /p:MSDeployPublishMethod=WMSvc /p:MsDeployServiceUrl=https://devmachine.server.com:8172/MsDeploy.axd /p:username=domainhere\adminuserhere /p:password=adminpasshere ``` Note: It would deploy just fine if I chose Publish... from inside the project.

Original source