The build restored NuGet packages. Build the project again to include these packages in the build
在 Visual Studio 2022 中构建代码时出现此错误。
严重性 代码 说明 项目 文件 行 禁止显示状态
错误 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.
于是找到了在stackoverflow找到了相关问题
https://stackoverflow.com/questions/63564405/the-build-restored-nuget-packages-build-the-project-again-to-include-these-pack
解决方案:
其中比较靠谱的就是在程序包管理器控制台中输入命令:
Update-Package -reinstall
进行更新“Microsoft.Bcl.Build”nuget 包