2

Visual Studio 2015 (with the support for .NET Core added on) gives you the option of creating a .NET Core library, or a .NET Core console app. If you do so, and look at the project's .json file, it looks like it's "limiting" you to the api defined by NetStandardLibrary 1.6:

{
  "version": "1.0.0-*",

  "dependencies": {
    "NETStandard.Library": "1.6.0",
    "Newtonsoft.Json": "9.0.1"
  },

  "frameworks": {
    "netstandard1.6": {
      "imports": "dnxcore50"
    }
  }
}

My understanding is that .net core 1.0 actually has a larger api than NetStandardCore, so why is VS 2015 defaulting your app to only accessing the api's specified in the NetStandardLibrary 1.6?

Nate Barbettini
  • 51,256
  • 26
  • 134
  • 147
Michael Ray Lovett
  • 6,668
  • 7
  • 27
  • 36

1 Answers1

1

My understanding is that .net core 1.0 actually has a larger api than NetStandardCore

That isn't correct. The .NET Standard Library defines a particular API surface area depending on the version.

The higher the version number, the more APIs you have access to. The lower the version number, the more compatible your code is with other platforms (like older versions of .NET, or mobile devices). netstandard1.6 is the highest and largest API right now.

.NET Core 1.0 or netcoreapp1.0 targets netstandard1.6. In other words, they have the same APIs available. This answer explains which moniker you should use:

  • netstandard1.X for class libraries
  • netcoreapp1.0 for applications
Community
  • 1
  • 1
Nate Barbettini
  • 51,256
  • 26
  • 134
  • 147