使用MS Build的IIS WebDeploy失败,错误为MSB4044 -ConcatFullServiceUrlWithSiteName任务 [英] IIS WebDeploy using MS Build Fails with error MSB4044 -ConcatFullServiceUrlWithSiteName task

查看:152
本文介绍了使用MS Build的IIS WebDeploy失败,错误为MSB4044 -ConcatFullServiceUrlWithSiteName任务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在设置Jenkins部署作业时,尝试通过命令行部署Visual Studio 2012 Web项目时,我一直遇到此错误.

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.

错误MSB4044:未为"ConcatFullServiceUrlWithSiteName"任务提供必需参数"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.

推荐答案

经过大量的搜索,最后将一个将要部署的项目与一个不会部署的项目进行比较,当我打开.csproj文件后,我终于弄清楚了文本编辑器并进行了比较. 在可行的项目中,我找到了以下部分:

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' ">

它有这一行:

<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.

这篇关于使用MS Build的IIS WebDeploy失败,错误为MSB4044 -ConcatFullServiceUrlWithSiteName任务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆