TFS2015构建服务器无法构建C#7.0功能 [英] TFS2015 Build Server can't build C#7.0 Features

查看:78
本文介绍了TFS2015构建服务器无法构建C#7.0功能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

因为我试图在构建服务器上使用TFS构建定义来构建C#7.0功能,但构建失败。


< o:p>< / o:p>


虽然我在本地机器上构建相同的代码然后它是成功。< o:p>< / o:p>


 < o:p>< / o:p>


在构建服务器上,我们有TFS2015版本& VS2017专业版已安装。我想知道为什么构建失败了构建定义。< o:p>< / o:p>


 < o:p>< / o:p> ;


请查看日志文件&让我知道在构建服务器上是否有任何遗漏我们需要采取哪些措施才能使其成功。< o:p>< / o:p>


 < o:p>< / o:p>


请回复此事。我们非常感谢您对解决方案的回复。< o:p>< / o:p>


显示以下MS构建错误


异常消息:MSBuild错误1已结束此构建。您可以在上面的消息中找到有关此错误原因的更多具体信息。 (类型BuildProcessTerminateException)
$
异常堆栈跟踪:  &NBSP;在System.Activities.Statements.Throw.Execute(CodeActivityContext context)

    at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance,ActivityExecutor executor,BookmarkManager bookmarkManager)

    at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor,BookmarkManager bookmarkManager,Location resultLocation)


解决方案

您好Dhurva,


感谢您在此发帖。


AFAIK,VS2017 RTM最近发布,而TFS2015之前发布。这就是TFS2015服务器中VS Build Task中没有VS2017选项的原因。若要解决此问题,您可以使用MSBuild任务而不是Visual Studio生成任务,配置MSBuild
指向我的MSBuild 15.0文件夹:


1。将MSBuild添加到构建步骤

2.在高级选项中,展开并填充'路径到MSBuild',如下图所示:

'C:\Program Files(x86)\ Microsoft Visual Studio \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ > 




此外,您还可以将服务器升级到最新的TFS2017,您会看到"Visual Studio"15" VS Build任务中列出的选项是VS2017的版本。


如果上面没有帮助,我建议你可以在  stackoverflow  带有TFS标记。 


因为这个论坛是关于MSBuild(讨论Microsoft构建引擎又名MSBuild。主题包括:通过任务,记录器和托管来使用MSBuild,构建自定义和MSBuild可扩展性。),该论坛上的更多社区成员可以进一步查看您的问题并提供更多建议。


如果你有一些MSBuild问题,请随时与我们联系。我们会尽力为您提供解决方案。



感谢您的理解与合作。


Since I am trying to build C# 7.0 features using TFS build definition at build server but build is failing.

<o:p></o:p>

Although I am build the same code at me local machine then it’s succeeding.<o:p></o:p>

 <o:p></o:p>

At build Server we have TFS2015 version & VS2017 professional is installed. I am wondering why the build is failing through build definition.<o:p></o:p>

 <o:p></o:p>

Kindly have a look on log file & let me know if anything Missing on build server & what workaround we need to do to make it successful.<o:p></o:p>

 <o:p></o:p>

Please do revert on this. We would really appreciate your response with solution.<o:p></o:p>

Showing Below MS Build Error

Exception Message: MSBuild error 1 has ended this build. You can find more specific information about the cause of this error in above messages. (type BuildProcessTerminateException)
Exception Stack Trace:    at System.Activities.Statements.Throw.Execute(CodeActivityContext context)
   at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager)
   at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)

解决方案

Hi Dhurva,

Thanks for posting here.

AFAIK, VS2017 RTM is released recently while TFS2015 was released before. That's why there is no VS2017 option in VS Build Task in TFS2015 Server. To resolve this issue, you can use MSBuild task instead of Visual Studio build task, configuring MSBuild to point to my MSBuild 15.0 folder:

1. Add MSBuild to your build steps
2. On the Advanced options, expand and fill the 'Path to MSBuild' like the image below:

'C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin'



Besides, you could also upgrade your server to the latest TFS2017, you would see "Visual Studio "15" option listed in VS Build Task which is the version for VS2017.

If above not help you, I suggest that you could open an new thread on the stackoverflow with TFS tag. 

Because this forum is about the MSBuild(Discuss the Microsoft build engine aka MSBuild. Topics including: usage of MSBuild, build customization, and MSBuild extensibility via tasks, loggers and hosting.), more community members on that forum may further look at your issue and provide more suggestions.

If you have some MSBuild questions, please feel free to contact us. We will try our best to give you a solution.

Thanks for your understanding and cooperation.


这篇关于TFS2015构建服务器无法构建C#7.0功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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