gpt4 book ai didi

azure - 使用 nuget 恢复最新版本在 DevOps 管道中构建问题

转载 作者:行者123 更新时间:2023-12-02 07:23:08 27 4
gpt4 key购买 nike

当我尝试从 Azure DevOps 运行构建管道时,出现 NuGet 恢复任务错误em> 获取最新版本。这并不是每次都会发生。经过多次尝试,管道已成功执行。

NuGet.CommandLine.ExitCodeException: Exception of type 'NuGet.CommandLine.ExitCodeException' was thrown.
at NuGet.CommandLine.MsBuildUtility.<GetProjectReferencesAsync>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at NuGet.CommandLine.RestoreCommand.<GetDependencyGraphSpecAsync>d__68.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at NuGet.CommandLine.RestoreCommand.<DetermineInputsFromMSBuildAsync>d__63.MoveNext()

最佳答案

Build issue in devops pipeline with nuget restore latest version

这是 4.8.1 版本中有关 nuget 的已知问题,该问题在版本(5.4)中尚未解决。

NuGet专家回复:

I'd imagine this is a fall out from the perf work with SkipNonExistentTargets.

The issue here is that these projects likely have non-existing imports. Projects like take a toll on the msbuild evaluation and make it significantly slower.

Try setting RestoreUseSkipNonexistentTargets="false"

要解决此问题,我们可以使用 NuGet tool installer安装旧版本 nuget 的任务,例如:4.7.1。或者,我们可以尝试在存储库根目录的 Directory.Build.Props 中设置属性 RestoreUseSkipNonexistentTargets="false"

请检查 Unresolved 问题 7796在 github 上了解更多详细信息。

希望这有帮助。

关于azure - 使用 nuget 恢复最新版本在 DevOps 管道中构建问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61096812/

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