Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
601 views
in Technique[技术] by (71.8m points)

tfs - Team Foundation Service build fails on NuGet package restore

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:asrcPlatformProdPlatform.WebPlatform.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.

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?

Thanks in advance.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

If someone still having this issue on tfs build server you need to go the following:

  1. Make sure all projects in solution you attempt to build have the latest Microsoft.Bcl.Build package (just update it in package manager).
  2. After build failed see all project (in tfs build log summary) that generate this error ("The build restored NuGet packages ...")
  3. Open each of those project's .proj file and comment out whole target element started with 'Target Name="EnsureBclBuildImported"'
  4. Check in and retry the build

It seems somehow after upgrading not all projects get those old block of build code removed and it's causing problems (as I understand it it's not longer needed after microsoft changed their bcl build process).


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

56.8k users

...