In Visual Studio, there are at least three different types of class libraries you can create:
- Class Library (.NET Framework)
- Class Library (.NET Standard)
- Class Library (.NET Core)
While the first is what we've been using for years, a major point of confusion I've been having is when to use the .NET Standard and .NET Core class library types. I've been bitten by this recently when attempting to multi-target different framework versions, and creating a unit test project.
So, what is the difference between Class Library (.NET Standard) and Class Library (.NET Core), why do both exist, and when should we use one over the other?