Your project is not referencing the ".NETFramework,Version=v4.5" framework.

.net entity-framework json nuget visual-studio-2015

Question

I'm working with VS 2015.

Your project is not referencing the ".NETFramework,Version=4.5" framework. Add a reference to ".NETFramework,Version=4.5" in the "frameworks" section of your project.json, and then re-run NuGet restore.

Shortly after adding to my MVC Layer, I started receiving this issue on my Data Access and Business Logic levels. Up until that point, everything was going smoothly, but I have no idea what caused this problem. My project is shown here. json:

{
  "version": "1.0.0-*",
  "description": "foo bar Class Library",
  "authors": [ "foo bar" ],
  "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"
      }
    }
  }
}

Here are the things I've tried:

  1. as found in this response, changing "dotnet5.4" to "net451" (and eliminating it).

The error remains the same.

  1. removing the "net451" and substituting "net45" for "dotnet5.4". This leads to a fresh error:

Your project.json doesn't have a runtimes section. You should add '"runtimes": { "win":{} }' to your project.json and then re-run NuGet restore.

I made an effort to add as this error indicated.

"runtimes": {
    "win":  {}
  },

I encountered the following mistake, which I am unable to rectify:

Your project.json doesn't list 'win' as a targeted runtime. You should add '"win": {}' inside your "runtimes" section in your project.json, and then re-run NuGet restore.

This is starting to sound like a red herring now that I've already added "win." How dare I change the project. Isn't NuGet in charge of handling json directly?

1
91
5/23/2017 12:34:58 PM

Accepted Answer

ZZZ_tmp
9
3/30/2016 2:34:52 AM

Popular Answer

ZZZ_tmp


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow