【问题标题】:What is the difference between 'dependencies' and 'framework dependencies' in project.json?project.json 中的“依赖项”和“框架依赖项”有什么区别?
【发布时间】:2015-11-11 16:49:15
【问题描述】:

dependenciesframework dependencies 中加载包有什么区别?

而且...现在可能只使用 dnxcore50 吗? (asp.net 5 beta6)

依赖关系:

{
  "description": "Lib",
  "version": "1.0.0-*",

  "dependencies": {
    "EntityFramework.SqlServer": "7.0.0-beta6"
  },

  "frameworks": {
    "dnx451": { },
    "dnxcore50": { }
    }
  }
}

框架依赖:

{
  "description": "Lib",
  "version": "1.0.0-*",

  "dependencies": {
  },

  "frameworks": {
    "dnx451": { },
    "dnxcore50": {
      "dependencies": {
          "EntityFramework.SqlServer": "7.0.0-beta6"
       }
    }
  }
}

【问题讨论】:

    标签: asp.net-core dnx


    【解决方案1】:

    dependencies 适用于frameworks 下列出的所有框架。 dependencies 在特定框架下的特定框架。这意味着您可以为 framework X 提取 dependency A,但如果您愿意,则不能为 framework Z

    【讨论】:

    • 所以如果我的 project.json 中只有一个框架,那么两个“依赖项”是否相同?
    • 是的,它们是一样的。仅当您有多个框架并且您希望每个框架都有不同的依赖项时,特定于框架的依赖项才有用
    猜你喜欢
    • 2014-12-09
    • 2015-11-13
    • 1970-01-01
    • 2012-06-30
    • 2020-08-31
    • 1970-01-01
    • 2016-12-19
    • 2022-11-04
    • 2012-11-17
    相关资源
    最近更新 更多