gpt4 book ai didi

c# - TFS 2013 在构建/部署期间抛出 Lib2GitSharp 错误(间歇性)

转载 作者:IT王子 更新时间:2023-10-29 04:19:05 31 4
gpt4 key购买 nike

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

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)

这个问题是非常间歇性的,可以通过简单地重试构建来绕过它。还有其他人遇到过这个吗?有什么解决办法吗?

最佳答案

我知道现在回答有点晚了,但它可能对其他人有帮助

Buck Hodges 的回答

在与 Manoj 和客户支持一起调试后,我们现在已经查明了这个问题的真相。当使用 Azure SDK 2.5 或更早版本时,它会影响作为构建过程一部分的 Azure 部署持续交付的门控 checkin 。解决方法是将 /p:GenerateBuildInfoConfigFile=false 添加到构建定义中的 msbuild 参数。我们正在努力更新生产中的构建 VM,但这需要 24-48 小时才能传播到所有构建池。

Adding msbuild argument

您可能想在此处阅读更多上下文 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

关于c# - TFS 2013 在构建/部署期间抛出 Lib2GitSharp 错误(间歇性),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29286052/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com