如何确定是否为TFS构建定义执行了MSBUILD参数 [英] How to determine if MSBUILD Arguments were executed for TFS Build Definition

查看:171
本文介绍了如何确定是否为TFS构建定义执行了MSBUILD参数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Team Foundation Service 2012,并在内部托管构建控制器,因此我可以将应用程序部署到我们的Web服务器.我设置了构建定义,并且正在使用我的Debug配置,并提供了以下MSBUILD参数.

I am using Team Foundation Service 2012, with a build controller hosted internally so I can deploy apps to our web servers. I setup the Build Definition, and am using the my Debug configuration, and have supplied the following MSBUILD arguments.

/p:DeployOnBuild=true /p:DeployTarget=MSDeployPublish /p:MSDeployPublishMethod=WMSVC /p:MSDeployServiceUrl=https://myserversname:8172/msdeploy.axd /p:AllowUntrustedCertificate=true /p:DeployIisAppPath="somesite.ourdomain.com" /p:Username=na\svc-users /p:Password=PASS /p:VisualStudioVersion=11.0

该解决方案构建良好,没有警告或错误.当我进入部署服务器时,该应用程序为空.我已经设置了对Web应用程序文件夹和inetsrv文件夹的权限.我还安装/配置了Web部署.如果没有返回任何错误,我该如何判断我的部署出了什么问题?我已经检查了构建服务器和部署服务器上的事件日志,并且都没有任何错误或警告.我也可以在我的开发机上进行发布,并且使用完全相同的参数可以完美地工作.

The solution builds just fine, I get no warnings, or errors. When I go my deployment server, the application is empty. I have setup the permissions to the web application folder, and inetsrv folder. I also installed/configured web deploy. If I am not getting any errors returned how can I tell what is going wrong with my Deployment? I have already checked the Event Logs on both the Build server, and the Deployment server, and neither have any errors or warnings. I can also do a publish from my dev machine and it works perfectly with the exact same parameters.

推荐答案

将这两个文件夹及其内容从开发环境复制到构建服务器:

Copy these two folders, and their content, from your development environment to the build server:

C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\Web
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\WebApplications

这些文件夹是由通过Visual Studio 2012发布引起的依赖项..sln文件中引用了此依赖项.

These folders are a dependency which is caused by publishing through Visual Studio 2012. This dependency is referenced in the .sln file.

不幸的是,这意味着Web部署会以静默方式失败.

Unfortunately this means web deploy is failing silently.

或者,您可以在构建服务器上安装Visual Studio,但这会浪费许可证.

Alternatively you could install Visual Studio on the build server but that would be a waste of a license.

这篇关于如何确定是否为TFS构建定义执行了MSBUILD参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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