2

From this post on stackoverflow:

"If you are building a library (to be consumed by another library or application), you'll target netstandard1.X"

"If you are building an application (console, UWP, ASP.NET Core web app), you'll target netcoreapp1.0"

However when I create new .net core class library project in Visual Studio 2017 I see this:

<TargetFramework>netcoreapp1.0</TargetFramework>

Why does a class library target netcoreapp?

Community
  • 1
  • 1

1 Answers1

1

In the New Project wizard you should select .NET Standard from the left tree.

netstandard project template

After creating project I get this:

  <PropertyGroup>
    <TargetFramework>netstandard1.4</TargetFramework>
  </PropertyGroup>

I have no idea why there is also a similar project in .NET Core section and its purpose but for most cases .NET Standard is right choice for Class Library projects.

neleus
  • 2,230
  • 21
  • 36