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

血红的双手。 提交于 2019-12-06 22:22:58

问题


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"
    ]
  }
},

回答1:


  • 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



来源:https://stackoverflow.com/questions/37326248/frameworks-and-imports-sections-in-project-json-what-are-they

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!