TFS构建-部署/程序包目标未运行 [英] TFS build - deployment/package target does not run

查看:61
本文介绍了TFS构建-部署/程序包目标未运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们建立了一个TFS构建定义,我们在其中传递了以下额外的MSBuild参数:

We have a TFS build definition set up where we pass the following extra MSBuild arguments in:

/p:DeployOnBuild=true;DeployTarget=PipelinePreDeployCopyAllFilesToOneFolder;_PackageTempDir="\\server\build";AutoParameterizationWebConfigConnectionStrings=false

在其他地方对此进行了详细介绍,这是一种将发布的文件复制到特定位置而不是生成部署程序包的方法.

This has been detailed elsewhere as a way to have the published files copied to a specific location instead of generating a deploy package.

不幸的是,这在我们的构建服务器上不起作用,但是,如果我在开发机器上运行与TFS调用的完全相同的msbuild命令行,那么它将完美运行并将输出文件复制到该位置.

This unfortunately does not work on our build server, however if I run the exact same msbuild command line as called by TFS on my dev machine then it works perfectly and copies the output files to the location.

我已经检查了日志文件,没有任何错误,似乎完全跳过了发布/部署步骤.

I have checked the log file and there is no errors, it just seems to completely skip the publish/deploy step.

Done building target "_BuiltWebOutputGroupOutput" in project "xyz.csproj".
Target "PrepareForRun" in file "c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets" from project "C:\Builds\2\xyz\xyz build\Sources\xyz.Web\xyz.Web.csproj" (target "CoreBuild" depends on it):

在我的本地计算机上,运行_BuiltWebOutputGroupOutput目标后,程序包目标将运行并正确部署文件.

whereas on my local machine, after _BuiltWebOutputGroupOutput target is run the package target runs and deploys the files correctly.

我尝试使用不同的路径,甚至在项目文件中设置属性,但似乎没有什么区别.我的本地解决方案和项目文件与TFS构建所使用的存储库中的相同.在构建服务器上或与构建代理相关的配置是否会导致打包目标无法运行?

I have tried using different paths and even setting the properties in the project file but it seems to make no difference. My local solution and project files are the same as in the repository that the TFS build is using. Is there something config related on our build server or with the build agent that would cause the packaging target not to run?

推荐答案

我今天遇到了类似的问题,并且找到了解决方法,因此也许值得您关注. 此处

I was having a similar problem today and found a fix so it maybe worth a look for you. Here

这篇关于TFS构建-部署/程序包目标未运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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