TFS 构建定义未将 mvc 应用程序部署到 IIS [英] TFS build definition not deploying mvc application to IIS

查看:26
本文介绍了TFS 构建定义未将 mvc 应用程序部署到 IIS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用 Visual Studio 的团队资源管理器和 TFS 创建构建定义以将 MVC 站点部署到 IIS.

I am attempting to use Visual Studio's Team Explorer and TFS to create a Build Definition to deploy a MVC site to IIS.

我遵循了名为使用 Team Foundation Server 2010 进行持续部署"的 Pluralsight 教程.

I followed the Pluralsight tutorial called 'Continuous Deployment with Team Foundation Server 2010'.

我在教程中遵循的步骤包括:

The steps I followed from the tutorial included:

  • 已安装的 IIS 管理脚本和工具
  • 已安装的管理服务
  • 在管理服务上,我允许远程连接并仅启用 Windows 凭据
  • 已安装的 Web 部署
  • 创建部署域帐户
  • 允许域帐户权限修改 IIS 文件系统
  • 使用此域帐户设置委托规则
  • 使用域帐户设置 IIS 权限

我在构建定义中设置的 MSBuild 参数是:

The MSBuild arguements I set in the build definition were:

/p:DeployOnBuild=true 
/p:DeployTarget=MSDeployPublish 
/p:CreatePackageOnPublish=False 
/p:MSDeployPublishMethod=WMSVC 
/p:SkipExtraFilesOnServer=True 
/p:AllowUntrustedCertificate=True 
/p:MSDeployServiceUrl="https://<iis server name>:8172/msdeploy.axd"
/p:Username="<domain>\<user>" 
/p:Password="<password>" 
/p:DeployIISAppPath="Default Web Site/<site name>"

我将构建排入队列,它通过,写入放置文件夹但未写入 IIS.

I queued a build and it passes, is written to the drop folder but NOT to IIS.

我使用相同的属性值从解决方案资源管理器发布了 MVC 应用程序,并且它已成功部署到 IIS.

I published the MVC application from the Solution Explorer using the same property values and it was successfully deployed to IIS.

有人知道我错过了什么吗?

Does anyone know what I am missing?

推荐答案

我通过检查本地机器上的内容并将其与构建服务器进行比较来解决该问题.

I solved the problem by examining the contents on my local machine and the comparing it with the build server.

我发现我本地机器上的C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0"的Web"和WebApplication"文件夹不在构建的同一位置服务器.

I found that the 'Web' and 'WebApplication' folders on my local machine at 'C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0' were not present in the same location on the build server.

一旦我将它们复制并粘贴到我的构建中,并且 mvc 站点按预期部署到 IIS.

Once I copied and pasted them across my build worked and the mvc site was deployed to IIS as expected.

这篇关于TFS 构建定义未将 mvc 应用程序部署到 IIS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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