TFS 2015 CI-在具有Web,控制台和WCF项目的解决方案中,不会为控制台应用程序生成构建工件 [英] TFS 2015 CI - Build artifacts are not generating for Console application in the solution which has web, console and WCF projects

查看:92
本文介绍了TFS 2015 CI-在具有Web,控制台和WCF项目的解决方案中,不会为控制台应用程序生成构建工件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用TFS 2015 CI为包含Web项目,WCF项目,类库和控制台应用程序的项目解决方案创建持续集成.该项目的结构如下所示

I am creating a continuous integration using TFS 2015 CI for a project solution which has combination of Web project, WCF Project , class libraries and Console Applcation. The Project is structured as shown below

Project Solution
 Project 1 (Web UI Project)
 Project 2 (WCF Project)
 Project 3 (Console Application-Batch Scheduler)
 Project 4 ( Class library)
 Project 5 ( Class library)
 Project 6 ( Class library)

我添加了MSBuild任务,并包含以下参数

I have added the MSBuild task and included the following arguments ,

/p:DeployOnBuild=true /p:Configuration=Release /p:OutDir=$(Build.ArtifactStagingDirectory) 

问题是,在Web,WCF和类库项目的构建工件"目录中生成的所有dll和构建文件,但对于控制台应用程序项目则不是.

The Problem is , All the dlls and build files generated in the Build artifacts directory for Web , WCF and class libraries project but not for the console application project.

我是否缺少MS Build参数中的任何内容,或者是否需要任何特定于项目的设置才能生成exe并在构建工件目录中发布控制台应用程序的文件.

Am I missing anything in MS Build argument or Is there any project specific setup required to generate the exe and release files for the console application in build artifact directory.

注意:在TFS CI中,由于Web项目中的一些长名称问题,Build部分成功,但是在本地解决方案中成功构建.

NOTE: In the TFS CI, Build is partially succeeded due to some long name issues in the web project but builds successfully in the local solution.

谢谢

推荐答案

首先浏览带有所有文件夹和子文件夹的构建工件目录.您可能没有注意到它.无需任何特定于项目的设置,即可生成构建工件目录中的控制台应用程序并生成exe和发行文件.

First go through your build artifacts directory with all folder and sub-folders.You may have not noticed it. There is not any project specific setup required to generate the exe and release files for the console application in build artifact directory.

Build.ArtifactStagingDirectory

之前将任何工件复制到的代理上的本地路径 被推到目的地.例如:c:\ agent_work \ 1 \ a.

The local path on the agent where any artifacts are copied to before being pushed to their destination. For example: c:\agent_work\1\a.

使用此文件夹的典型方法是发布构建工件 复制文件和发布构建工件的步骤.

A typical way to use this folder is to publish your build artifacts with the Copy files and Publish build artifacts steps.

只需确保您已将工件发布到服务器或共享文件夹.要缩小此问题的范围,您还可以尝试直接构建控制台应用程序"项目,以查看.exe是否成功生成.并创建一个新的普通控制台应用程序,而不是控制台应用程序批处理计划程序,以缩小与该问题相关的范围.

Just need to make sure you have published the artifacts to the server or a share folder. To narrow down this issue, you could also try to directly build the Console Application project to see if the .exe generated successfully. And create a new normal Console Application instead of Console Application-Batch Scheduler to narrow down if the issue is related to it.

这篇关于TFS 2015 CI-在具有Web,控制台和WCF项目的解决方案中,不会为控制台应用程序生成构建工件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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