dotnet5.4 TFM 是否向前兼容 RC2?

Is the dotnet5.4 TFM forward compatible to RC2?

如果我要发布一个支持 dotnet5.4 名字对象的库的新版本,它是否可以从 .NET Core 1.0 RC2 中使用,或者我是否需要明确发布一个以 netstandardX 为目标的新版本?

(我意识到这些名字实际上并不等同,更多的是关于维护对 .NET Core 的支持)

"dotnet" 绰号是 mapped 到 "netstandard",因此您现在应该使用 dotnet。

请注意,dotnet5.4 有一些限制,因为它 runs 在 .NET Framework 4.6 或更高版本、通用 Windows 平台 10 ( UWP)、DNX Core 5.0 和 Mono/Xamarin 平台。

编辑:根据David Fowler my original answer is incorrect and "dotnet" and "netstandard" are not interchangeable anymore。您需要显式导入 dotnet5.x。

{
    "frameworks": {
        "netstandard1.5": {
            "imports": "dotnet5.6",
            "dependencies": {
            "SomeDependency": "1.0.0"
            }
        }
    }
}

更新基于 a conversation on GitHub @davidfowl

本质上,答案是我们"no, dotnetX libraries will not automatically be consumed by rc2+ projects targetting netstandardX"。

但是,NuGet(大约 rc2)将支持 project.json 中的 "imports" 属性,这将包括具有框架的其他目标。该功能已 described 为 "go away NuGet, I know what I want"

例如,要在您的 netstandard1.3 项目构建中包含 dotnet5.4 库,您可以使用:

{
  "frameworks": {
    "netstandard1.3": {
      "imports": "dotnet5.4"
    }
  }
}