Building class libraries

Class library assemblies group types together into easily deployable units (DLL files). Apart from when you learned about unit testing, you have only created console applications to contain your code. To make the code that you write reusable across multiple projects, you should put it in class library assemblies, just like Microsoft does.

Tip

Good Practice

Put types that you might reuse in a .NET Standard class library to enable them to be reused in .NET Core, .NET Framework, and Xamarin projects.

Creating a class library with Visual Studio 2017

Start Microsoft Visual Studio 2017. In Visual Studio, press Ctrl + Shift + N, or go to File | New | Project....

In the New Project dialog, in the Installed | Templates list, expand ...

Get C# 7 and .NET Core: Modern Cross-Platform Development - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.