升级到netcoreapp2.0后报错

Errors after upgrading to netcoreapp2.0

我将 ASP.NET 核心解决方案从 netcoreapp1.1 升级到 netcoreapp2.0:

我尝试了一些我发现的技巧,例如:

但是我遇到了很多这样的错误:

The type 'Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'.

我还需要做什么?

原来我们在解决方案根目录中有一个 Directory.Build.props 文件,其中包含解决方案中所有项目的通用 msbuild 内容。

该文件引用了 netcoreapp1.1。一旦我将其更新为 netcoreapp2.0,一切正常。