What kind of . NET library should I choose in C#project?

Asked

Viewed 269 times

3

I’m thinking of creating a new project in c# I saw three types of libraries that caught my attention and I couldn’t distinguish exactly what would be the best applicability in each project.

  • .NET Framework Class Library
  • .NET Core Class Library
  • Standard Class Library

Clearly I could understand that they are specific if the project goes cross-Platform or if it is native to Windows among others.

But one example left me intrigued: . NET Core is cross-Platform can be used for example on Linux servers, and the Standard is also used in the same context.

  • 1

    Libraries . NET Framework is for . NET Framework. Libraries . NET Core is for . NET Core. Libraries . NET Standard is for both. One tends to be more limited than the other, see Maniero’s answer for more details.

1 answer

11


For new projects you should only use .NET Core who will be the one who framework that will survive (see more). See more in The . NET Framework is dead?. I don’t know if it’s relevant yet, but...

The . NET Standard is not a library, so you cannot use it. As the name says is a pattern, it is a specification. You can see more in What’s the difference when creating a class libray (.net framework) and class library(.net standard) project in VS2017?. You choose it when you want to ensure that the project meets this specification and does not allow anything outside it that is from a specific implementation of CLR.

If you are still using an old project that was created with . NET Framework then you should use the first.

See more about What are the differences of ". NET"?. And What should I understand when they say ". Net"?. Understand the versions of. NET.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.