EntityFramework 6.1.3 does not support framework .NETPlatform,Version=v5.4 on visual studio 2015

后端 未结 5 932
太阳男子
太阳男子 2021-02-19 04:29

Any idea why I receive the following error after Nuget installing Entity framework 6.1.3?

Error notice: \"The dependency EntityFramework 6.1.3 in project

5条回答
  •  伪装坚强ぢ
    2021-02-19 05:18

    I quickly fixed a similar issue by manually editing the project.json file.

    Note: Let me mention that my solution is Asp.net 5.0 Web Application and is targeting DNX 4.5.1

    It was:

    {
      "version": "1.0.0-*",
      "description": "DataLayer Class Library",
      "authors": [ "local-admin" ],
      "tags": [ "" ],
      "projectUrl": "",
      "licenseUrl": "",
      "frameworks": {
        "net451": { },
        "dotnet5.4": {
          "dependencies": {
            "Microsoft.CSharp": "4.0.1-beta-23516",
            "System.Collections": "4.0.11-beta-23516",
            "System.Linq": "4.0.1-beta-23516",
            "System.Runtime": "4.0.21-beta-23516",
            "System.Threading": "4.0.11-beta-23516"
          }
        }
      },
      "dependencies": {
        "EntityFramework": "6.1.3"
      }
    }
    

    I replaced the frameworks section and became:

    {
      "version": "1.0.0-*",
      "description": "DataLayer Class Library",
      "authors": [ "local-admin" ],
      "tags": [ "" ],
      "projectUrl": "",
      "licenseUrl": "",
      "frameworks": {
        "dnx451": { }
      },
      "dependencies": {
        "EntityFramework": "6.1.3"
      }
    }
    

提交回复
热议问题