zoukankan      html  css  js  c++  java
  • Newtonsoft.Json源码的solution打开之后,无法加载project

    无法加载项目

    https://github.com/JamesNK/Newtonsoft.Json

    C: epositoryGitHubOtherNewtonsoft.JsonSrcNewtonsoft.JsonNewtonsoft.Json.csproj : error : The project file cannot be opened by the project system, because it is missing some critical imports or the referenced SDK cannot be found.

    Detailed Information:
    Unable to locate the .NET Core SDK. Check that it is installed and that the version specified in global.json (if any) matches the installed version.

    查看根目录下的global.json文件

    {
    "sdk": {
    "version": "2.2.105"
    }
    }

    本地环境缺少2.2.105

    https://chocolatey.org/packages/dotnetcore-sdk/2.2.105

    使用choco进行安装

    编译失败

    Error occurred while restoring NuGet packages: The operation failed as details for project Newtonsoft.Json could not be loaded.
    1>------ Build started: Project: Newtonsoft.Json, Configuration: Release Any CPU ------
    1>C:Program Filesdotnetsdk2.2.105SdksMicrosoft.NET.Sdk argetsMicrosoft.PackageDependencyResolution.targets(208,5): error NETSDK1004: Assets file 'C: epositoryGitHubOtherNewtonsoft.JsonSrcNewtonsoft.Jsonobjproject.assets.json' not found. Run a NuGet package restore to generate this file.
    1>Done building project "Newtonsoft.Json.csproj" -- FAILED.
    1>C:Program Filesdotnetsdk2.2.105SdksMicrosoft.NET.SdkSdkSdk.targets(41,3): error MSB4019: The imported project "C:Program Files (x86)Microsoft Visual Studio2019CommunityMSBuildMicrosoftPortablev4.0Microsoft.Portable.CSharp.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
    1>Done building project "Newtonsoft.Json.csproj" -- FAILED.
    1>C:Program Filesdotnetsdk2.2.105SdksMicrosoft.NET.SdkSdkSdk.targets(41,3): error MSB4019: The imported project "C:Program Files (x86)Microsoft Visual Studio2019CommunityMSBuildMicrosoftPortablev4.5Microsoft.Portable.CSharp.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
    1>Done building project "Newtonsoft.Json.csproj" -- FAILED.
    1>C:Program Filesdotnetsdk2.2.105SdksMicrosoft.NET.Sdk argetsMicrosoft.PackageDependencyResolution.targets(208,5): error NETSDK1004: Assets file 'C: epositoryGitHubOtherNewtonsoft.JsonSrcNewtonsoft.Jsonobjproject.assets.json' not found. Run a NuGet package restore to generate this file.
    1>C:Program Filesdotnetsdk2.2.105SdksMicrosoft.NET.Sdk argetsMicrosoft.PackageDependencyResolution.targets(208,5): error NETSDK1004: Assets file 'C: epositoryGitHubOtherNewtonsoft.JsonSrcNewtonsoft.Jsonobjproject.assets.json' not found. Run a NuGet package restore to generate this file.
    1>C:Program Filesdotnetsdk2.2.105SdksMicrosoft.NET.Sdk argetsMicrosoft.PackageDependencyResolution.targets(208,5): error NETSDK1004: Assets file 'C: epositoryGitHubOtherNewtonsoft.JsonSrcNewtonsoft.Jsonobjproject.assets.json' not found. Run a NuGet package restore to generate this file.
    1>Done building project "Newtonsoft.Json.csproj" -- FAILED.

    C: epositoryGitHubOtherNewtonsoft.JsonSrcNewtonsoft.JsonNewtonsoft.Json.csproj : error MSB4057: The target "_GetRestoreSettingsPerFramework" does not exist in the project.

    https://github.com/JamesNK/Newtonsoft.Json/issues/2057#issuecomment-493294589

  • 相关阅读:
    福大软工 · 第八次作业(课堂实战)- 项目UML设计(团队)
    福大软工1816 · 第六次作业
    2018软工实践——团队答辩
    福大软工1816 · 第五次作业
    福大软工1816 · 第二次作业
    福大软工1816 · 第一次作业
    个人作业——软件产品案例分析
    第二次结对编程作业--毕设导师智能匹配
    结对项目之需求分析与原型设计
    调研《构建之法》指导下的全国高校的历届软工实践作品、全国互联网+竞赛、物联网竞赛等各类全国性大学生信息化相关的竞赛平台的历届作品
  • 原文地址:https://www.cnblogs.com/chucklu/p/11052300.html
Copyright © 2011-2022 走看看