该构建还原了 NuGet 包。再次构建项目以将这些包包含在构建中

The build restored NuGet packages. Build the project again to include these packages in the build

错误:

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

我在 Visual Studio 2017 年构建代码时遇到此错误。 作为一种解决方法,我必须清理代码并重新构建。然后我没有看到这个错误。 每次 O build 都会返回此错误。我必须先清理然后再构建。有人有类似的问题吗?

尝试更新“Microsoft.Bcl.Build”nuget 包。这就是我的解决方案。

将@sɐunıɔןɐqɐp 的评论转为答案

运行 程序包管理器控制台中的此命令

Update-Package -reinstall