Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Frameworks and imports sections in project.json: what are they?

What exactly are the frameworks and imports sections of the project.json file of a ASP.NET Core 1.0 project and what do they do? I've been trying to find "official" documentation to understand it better.

Here's a boilerplate example from a recent Yeoman-scaffolded ASP.NET project I started up:

"frameworks": {
  "netcoreapp1.0": {
    "imports": [
      "dotnet5.6",
      "dnxcore50",
      "portable-net45+win8"
    ]
  }
},
like image 812
robbpriestley Avatar asked May 19 '16 14:05

robbpriestley


1 Answers

  • frameworks is the list of target frameworks that you application supports.
  • imports is a way to use packages that were not designed for that framework. Basically you tell it "Use those targets even though they don't seem to be supported. I know what I'm doing".

Here's a gist that might give you more insights into how various TFMs (Target Framework Monikers) map to each other https://gist.github.com/davidfowl/8939f305567e1755412d6dc0b8baf1b7

like image 146
Victor Hurdugaci Avatar answered Oct 13 '22 19:10

Victor Hurdugaci