MSBuild 参数上的 DeployIisAppPath 设置需要什么? [英] What is expected for DeployIisAppPath setting on MSBuild argument?

查看:16
本文介绍了MSBuild 参数上的 DeployIisAppPath 设置需要什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

SERVERNAME(myDomainUsername)
   Application Pools
   Sites
      DEV Site1
      DEV Site2
      dev Site 3
         bin
         Content
         ...
         Views
      etc ...

这是我的 DEV Web 服务器的基本布局.我们的 DEV Web 服务器上运行着许多站点.我正在尝试使用 TFS 2013 Build 将我的网站发布到 DEV 服务器,以下文章来自 Vishal Joshi, Microsoft 和其他人.

This is my basic layout of our DEV web server. Our DEV web server has many sites running on it. I am trying to use TFS 2013 Build to publish my web site to the DEV server following articles from Vishal Joshi, Microsoft and others.

我的错误是ERROR_SITE_DOES_NOT_EXIST".基本修复对我没有帮助.

My error is "ERROR_SITE_DOES_NOT_EXIST". The basic fix does not help me.

在我的示例中,我使用的是 /p:DeployIisAppPath="dev Site 3".该站点下没有定义任何应用程序.

In my example, I'm using /p:DeployIisAppPath="dev Site 3". There are no applications defined under the site.

微软的说明 没用.我以为我应该只使用 IIS 站点名称,但事实证明这并不成功.此参数的预期值是多少?有人需要应用程序池名称吗?是否有我可以针对 IIS 发出的命令来导出所有可用 AppPath 的列表?一旦我在 DEV 服务器上弄清楚了这一点,我就必须对 STG 服务器做同样的事情.

Microsoft's instructions are useless. I thought I should just use the IIS site name, but that is not proving successful. What is the value expected for this parameter? Do I someone need the App Pool name? Is there a command I can issue against IIS to export the list of all the AppPaths available? Once I figure this out on the DEV server, I have to do the same with the STG server.

[更新 1]添加完整的 MSBuild 参数

[UPDATE 1] Adding the full MSBuild arguments

/p:DeployOnBuild=True 
/p:DeployTarget=MsDeployPublish 
/p:CreatePackageOnPublish=True 
/p:MSDeployPublishMethod=InProc 
/p:MSDeployServiceUrl=http://SERVER:PORT/MsDeployAgentService
/p:DeployIisAppPath="dev Site 3"

推荐答案

您的服务器在您的域内,因此我将使用我为我们的内部服务器提供的解决方案.我不得不为我们的 DMZed 服务器想出一些不同的东西.

Your server is inside your domain, so I will use the solution that I have for our inside server. I had to come up with something different for our DMZed servers.

/p:DeployOnBuild=True 
/p:DeployTarget=MsDeployPublish 
/p:CreatePackageOnPublish=False 
/p:MSDeployPublishMethod=WMSvc 
/p:MsDeployServiceUrl="https://SERVER:8172/MsDeploy.axd?Site=direct" 
/p:DeployIisAppPath="direct" 
/p:AllowUntrustedCertificate=True 
/p:AuthType=NTLM 
/p:UserName=

此解决方案使用 WMSvc(安装在网络服务器上)允许 TFS 构建过程访问部署时需要访问的服务器部分.我还没有尝试过 MSDeployAgentService,所以我不确定那个.就我而言,我没有在部署时创建包(我似乎记得当我这样做时它返回了一个错误,尽管我不记得它是什么).

This solution uses WMSvc (installed on the webserver) to allow the TFS build process to access the portions of the server that it needs to when deploying. I havent tried MSDeployAgentService, so i am unsure about that one. In my case, I do not create a package on deploy ( I seem to recall it returned an error when I did that, although I don't remember what it was).

此外,最后三个参数对于 TFS 构建服务帐户登录 VMSvc 并执行其操作是必需的.将 UserName 留空会使其作为运行帐户登录(不需要提供密码,是的!).

Also, last three arguments are necessary to for the TFS Build Service account to log into VMSvc and do its thing. Leaving UserName blank causes it to log in as the running account (no need to supply a password, yay!).

以下是成功部署的构建日志输出示例.

Here is an example output from the build log on a successful deployment.

   MSDeployPublish:
     Start Web Deploy Publish the Application/package to https://SERVER:8172/MsDeploy.axd?Site=direct ...
     Starting Web deployment task from source: manifest(C:Builds1DirectContinuous Integration (SERVER)Binaries\_PublishedWebsitesWEBPROJECTNAME_PackageArchive.SourceManifest.xml) to Destination: auto().
     Adding ACL's for path (direct)
     Adding ACL's for path (direct)
     Updating file (directinContentimagesuttonBkgHover.png).
          ... Removed for brevity => This section is all 'Updating file (PATH).'
     Updating file (directWeb.config).
     Adding ACL's for path (direct)
     Adding ACL's for path (direct)
     Successfully executed Web deployment task.
     Publish is successfully deployed.
   PipelineDeployPhase:
     Publish Pipeline Deploy Phase

这篇关于MSBuild 参数上的 DeployIisAppPath 设置需要什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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