Creating the .NET Standard 2.0 library
In this recipe, we will be building a .NET Standard 2.0 library using Visual Studio for Mac. We will be using the same solution from the previous recipe.
Getting ready
Make sure you have completed the previous recipe that added an iOS project. If so, let's get started with adding the library and writing some code.
How to do it...
- Open Finder.
- Click
Applications
in the left-hand pane. - Now, double-click on the Visual Studio icon.
- Now, click on
Open
, locate theChapter8.Xamarin
solution, and open it. - The
Solution Explorer
should look like this:

- Now, control (^) + click on the
Chapter8.Xamarin
label and selectAdd
|New Project
. - In the
New Project
dialog box, scroll down the left-hand pane till you see theMulti Platform
section.
- Click on
Library
and select.NET Standard Library
underGeneral
in the right-hand pane. Also make sureC#
is selected:

- Click
Next
. - Select
Target Framework:
as.NET Standard 2.0
and clickNext
:

- In the
Project Name:
textbox, typeChapter8.Xamarin...