If someone still having this issue on tfs build server you need to go the following:
- Make sure all projects in solution you attempt to build have the latest Microsoft.Bcl.Build package (just update it in package manager).
- After build failed see all project (in tfs build log summary) that generate this error (“The build restored NuGet packages …”)
- Open each of those project’s .proj file and comment out whole target element started with ‘Target Name=”EnsureBclBuildImported”‘
- 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).