问题描述
我的Team Foundation Service版本有点奇怪的问题.我将其排队,并且开始就很好,但是随后失败,并显示以下错误:
I'm having kind of an odd problem with my Team Foundation Service build. I queue it up and it starts just fine, but then it fails with the following error:
C:\a\src\Platform\Prod\Platform.Web\Platform.Web.csproj (436): The build restored NuGet packages. Build the project again to include these packages in the build. For more information, see http://go.microsoft.com/fwlink/?LinkID=317568.
因此,然后我根据消息/URL重新排队构建,然后...再次发生.我已经在Google周围搜索了,但似乎无法弄清楚问题出在哪里.我可以在Visual Studio中构建良好,并且已将解决方案配置为进行包还原.有什么想法吗?
So then I re-queue the build per the message/URL and...it happens again. I've Googled around but I can't seem to figure out what the issue is. I can build just fine in Visual Studio and the solution is configured for package restore. Any thoughts?
谢谢.
推荐答案
The solution to this is specified in link in the error message itself.
This is happening due to an Improvement as specified in that page:
我们更新了Microsoft.Bcl.Build,以使用其他方法.新的 版本将使用类似于NuGet的条件导入 自动导入功能.这将始终使项目能够 在Visual Studio中加载.
但是,Microsoft.Bcl.Build还向您的项目添加了一个目标 将在构建完成后运行.此目标检查是否 当前版本已还原的软件包,如果失败,则显示 可行的错误消息:
第二次构建将解决此错误.请注意, 错误仅在缺少包裹的情况下才会出现,因此与您不一样 总是要建造两次.
Then it specifies as below for the case of build server / continuous integration (CI):
So, I suppose for your issue resolution the above two steps should be followed.
这篇关于在NuGet软件包还原时Team Foundation Service构建失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!