您的项目未引用“.NETPortable,Version=v4.5,Profile=Profile78”

Your project is not referencing the ".NETPortable,Version=v4.5,Profile=Profile78"

当我构建我的 PCL 项目时,我收到以下错误:

Microsoft.NuGet.targets(186, 5): [null] Your project is not referencing the ".NETPortable,Version=v4.5,Profile=Profile78" framework. Add a reference to ".NETPortable,Version=v4.5,Profile=Profile78" in the "frameworks" section of your project.json, and then re-run NuGet restore.

当您在同一目录中有.netstandard 项目并构建一次时,会出现以下错误。 它在 Obj 目录中留下 .json 文件,并破坏了 PCL 项目构建。

将 .netstandard .csproj 移出此目录并删除 BinObj 目录。