【问题标题】:Your project is not referencing the ".NETPortable,Version=v4.5,Profile=Profile78"您的项目没有引用“.NETPortable,Version=v4.5,Profile=Profile78”
【发布时间】:2018-05-11 00:49:53
【问题描述】:

当我构建我的 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.

【问题讨论】:

    标签: msbuild .net-standard


    【解决方案1】:

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

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

    【讨论】:

    • 这发生在我将 PCL 项目切换到 .netstandard 项目然后切换回来的情况下。
    • 谢谢!我遇到了一个问题,并删除了最近创建的 obj 文件。我还必须删除创建的 project.json.locked 然后它开始工作。
    • 我没有 project.json 但有 project.assets.json。我没有规定将此项目移出目录。任何其他解决方案都受到高度赞赏。
    猜你喜欢
    • 1970-01-01
    • 2020-12-20
    • 2016-07-11
    • 2017-11-05
    • 1970-01-01
    • 2018-05-04
    • 2019-04-23
    • 1970-01-01
    • 2019-10-25
    相关资源
    最近更新 更多