Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 989
Adrian Carr Avatar asked Aug 09 '13 17:08

Adrian Carr


2 Answers

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.

like image 79
Adrian Carr Avatar answered Nov 10 '22 22:11

Adrian Carr


You could pass this DeployIisAppPath as parameter to Jenkins, like this: p:DeployIisAppPath=Default Web Site/sitenamehere This would allow you to have different sitenames on different machines. While in your example (with CSPROJ modification) you would be obliged to have one IIS site name on all target machines

like image 21
Антон Курьян Avatar answered Nov 10 '22 22:11

Антон Курьян