static void

ASP.Net Core project.json

project.json is tooling for VS2015-Update 3 (2016). From VS2017 onwards (March 2017+), use csproj

Class Libraries: netstandard1.6

Libraries are based on a standard .net API (does not apply to Consoles and ASP/MVC, which are also consoles)

The standard .net API at release is 1.6.0 (there is a 1.6.1 but "there is no benefit in referencing it for libraries")

{
  "version""1.0.0-*",
  "dependencies": {
    "NETStandard.Library""1.6.0"
  },
  "frameworks": {
    "netstandard1.6": {
      "imports""dnxcore50"
    }
  }
}

Consoles (incl ASP, Tests): netcoreapp1.0

Executables (consoles and ASP websites) need a concrete framework to run them, not an API. A simple console looks like this (ASP has more specific dependencies)

This is the standard console project.json at RTM. In consoles, the framework import "dnxcore50" allows old RC1 packages to be used; the ASP template imports "dotnet5.6" for RC2 packages.

{
  "version""1.0.0-*",
  "buildOptions": {
    "emitEntryPoint"true
  },
  "dependencies": {
    "Microsoft.NETCore.App": {
      "type""platform",
      "version""1.0.0"
    }
  },
  "frameworks": {
    "netcoreapp1.0": {
      "imports""dnxcore50"
    }
  }
}

netcoreapp1.1 (Nov 2016)

A version bump- netcoreapp1.0 to 1.1, dependency Microsoft.NETCore.App goes to 1.1.0

  "frameworks": {
   "netcoreapp1.1": {
    "dependencies": {
      "Microsoft.NETCore.App": {
      "type""platform",
      "version""1.1.0"
    }
  }
}

If you multi-target (net4.6 and Core 1.0, for instance), you'll need to push the core dependency (Microsoft.NETCore.App) under the core framework (netcoreapp1.0). If you have older code (not netstandard1.6), you quickly run into conflicts and have to start #if /#endif through your code.