TFS 2013在构建/部署(间歇性)期间引发Lib2GitSharp错误 [英] TFS 2013 Throws Lib2GitSharp Error During Build/Deploy (Intermittent)

查看:42
本文介绍了TFS 2013在构建/部署(间歇性)期间引发Lib2GitSharp错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

一段时间以来,我在Team Foundation Server的构建/部署过程中遇到了问题,间歇性地抛出以下错误:

For a while now, I have been having an issue with Team Foundation Server build/deploy process throwing the following error intermittently:

Unhandled Exception: System.TypeInitializationException: The type initializer for 'LibGit2Sharp.Core.NativeMethods' threw an exception. ---> System.BadImageFormatException: An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)
at LibGit2Sharp.Core.NativeMethods.git_threads_init()
at LibGit2Sharp.Core.NativeMethods.LibraryLifetimeObject..ctor()
at LibGit2Sharp.Core.NativeMethods..cctor()
--- End of inner exception stack trace ---
at LibGit2Sharp.Core.NativeMethods.RemoveHandle()
at LibGit2Sharp.Core.NativeMethods.LibraryLifetimeObject.Finalize()
Exception Message: MSBuild error 255 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)

这个问题是非常间歇性的,可以通过简单地重试构建来解决.还有其他人碰到这个吗?有解决方案吗?

This problem is very intermittent and it can be bypassed by simply retrying the build. Has anyone else run into this? Any solutions?

推荐答案

我知道答案来得有点晚,但可能会对其他人有所帮助

I know it is a little bit late for answer but it might help someone else

answer by Buck Hodges

answer by Buck Hodges

在通过Manoj和客户支持进行调试后,我们现在已经深入到此问题的底部.当使用Azure SDK 2.5或更旧版本时,它影响了作为构建过程一部分的持续交付Azure部署的封闭式签入.解决方法是将/p:GenerateBuildInfoConfigFile = false 添加到构建定义中的msbuild参数.我们正在更新生产环境中的构建VM,但这需要24-48小时才能传播到所有构建池.

We have now gotten to the bottom of this issue after debugging it with Manoj and customer support. It affected gated checkin of continuous delivery of Azure deployments as part of the build process when using the Azure SDK 2.5 or older. The workaround is to add /p:GenerateBuildInfoConfigFile=false to the msbuild arguments in your build definition. We are working on updating the build VM in production, but that will take 24-48 hours to propagate to all build pools.

您可能想在这里阅读更多内容

You might want to read more in context here https://social.msdn.microsoft.com/Forums/en-US/5a0d1950-1367-41a6-9171-676a0d0e93c1/tfs-online-getted-checkin-build-failures-vs-online-tfs-online-team-need-to-look-into-it?forum=TFService

基于评论的替代解决方案

如果在构建服务器上安装了VS,请确保已打开它并获得许可.通过 @Phill

If you have VS installed on your build server, make sure you have opened it and licensed it. by @Phill

这篇关于TFS 2013在构建/部署(间歇性)期间引发Lib2GitSharp错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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