Is .NET CLI only for .NET Core?

Do I use the .NET CLI if I want to create an ASP.NET Core 1.0 app that uses the .NET Framework? Is .NET CLI only for the new .NET Core library or both Core and .NET 4.6?

Jon Skeet
people
quotationmark

You can use dotnet cli for full framework apps and libraries as well. You just need to use the appropriate framework tag - for example "net46" to target .NET 4.6. You can target multiple frameworks, too:

For example, from my Noda Time library:

"frameworks": {
  "net45": {
    "frameworkAssemblies": {
      "System.Xml": "",
      "System.Numerics": ""
    }
  },
  "netstandard1.1": {
    "buildOptions": {
      "define": [ "PCL" ]
    },
    "dependencies": {
      "System.Diagnostics.Debug": "4.0.11",
      "System.Globalization": "4.0.11",
      "System.Linq": "4.1.0",
      "System.Resources.ResourceManager": "4.0.1",
      "System.Runtime.Extensions": "4.1.0",
      "System.Runtime.Numerics": "4.0.1",
      "System.Runtime.Serialization.Xml": "4.1.1",
      "System.Threading": "4.0.11",
      "System.Xml.XmlSerializer": "4.0.11"
    }
  }
}

The PCL preprocessor symbol will be renamed to "DOTNET_CORE" or similar at some point - it's only there because I have a bunch of code that uses it for conditional compilation back when I used to target portable class libraries.

You can still also target portable class libraries, by the way... so a single package can target many different versions.

people

See more on this question at Stackoverflow