project.json中的框架和导入部分:它们是什么? [英] Frameworks and imports sections in project.json: what are they?

查看:206
本文介绍了project.json中的框架和导入部分:它们是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

ASP.NET Core 1.0项目的project.json文件的frameworksimports部分到底是什么,它们做什么?我一直在尝试查找官方"文档以更好地理解它.

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.

这是我最近在Yeoman-scaffolded ASP.NET项目中启动的样例:

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

推荐答案

  • frameworks是您的应用程序支持的目标框架的列表.
  • imports是一种使用不是为该框架设计的软件包的方法.基本上,您告诉它即使似乎不受支持,也要使用这些目标.我知道我在做什么".
    • 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".
    • 这里有一个要点,可以为您提供更多洞察力,以了解各种TFM(目标框架Monikers)如何相互映射 https://gist.github.com/davidfowl/8939f305567e1755412d6dc0b8baf1b7

      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

      这篇关于project.json中的框架和导入部分:它们是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆