Team Foundation Service build fails on NuGet package restore

后端 未结 10 2027
半阙折子戏
半阙折子戏 2020-12-13 02:23

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:



        
10条回答
  •  清歌不尽
    2020-12-13 03:23

    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).

提交回复
热议问题