Getting error Microsoft.AspNetCore.MVC 1.1.0 does not support framework .NETCoreApp, Version v1.1

281 Views Asked by At

Trying to start an .Net CORE project with MVC. Attempting to use the latest version of .Net CORE (v1.1) and I cannot get a version of MVC to work as a dependency. Below is my project.json file.

 {

  "buildOptions": {
    "emitEntryPoint": true,
    "debugType": "portable",
    "preserveCompilationContext": true
  },
  "dependencies": {
    "Microsoft.AspNetCore.Diagnostics": "1.1.0",
    "Microsoft.AspNetCore.Mvc": "1.1.0",
    "Microsoft.AspNetCore.Mvc.TagHelpers": "1.1.0",
    "Microsoft.AspNetCore.Server.IISIntegration": "1.1.0",
    "Microsoft.AspNetCore.Server.Kestrel": "1.1.0",
    "Microsoft.AspNetCore.StaticFiles": "1.1.0",
    "Microsoft.EntityFrameworkCore": "1.1.0",
    "Microsoft.EntityFrameworkCore.Design": "1.1.0",
    "Microsoft.EntityFrameworkCore.Relational": "1.1.0",
    "Microsoft.EntityFrameworkCore.SqlServer": "1.1.0",
    "Microsoft.Extensions.Configuration.EnvironmentVariables": "1.1.0",
    "Microsoft.Extensions.Configuration.Json": "1.1.0"
  },
  "frameworks": {
    "netcoreapp1.1": {
      "dependencies": {
        "Microsoft.NETCore.App": {
      "type": "platform",
      "version": "1.1.0"
    }
  },
  "imports": [
    "dnxcore50"
      ]
    }
  },
  "publishOptions": {
    "include": [
      "wwwroot",
      "web.config"
    ]
  },
  "runtimeOptions": {
    "gcServer": true
  },
  "scripts": {
    "postpublish": [ "dotnet publish-iis --publish-folder     %publish:OutputPath% --framework %publish:FullTargetFramework%" ]
  }
}

Gives this error:

The dependency Microsoft.AspNetCore.Mvc 1.1.0 does not support framework .NETCoreApp,Version=v1.1

1

There are 1 best solutions below

0
Arkady Spiridonov On BEST ANSWER

Just install runtime (not only SDK) from here: https://www.microsoft.com/net/download/core#/current/runtime. Maybe you'll need execute "dotnet restore" command. It helps to me.