How to do it...

  1. Open Visual Studio 2017.
  2. Click File | New | Project and, in the New Project template dialog box, select Visual Studio Solutions under Other Project Types in the left-hand pane and select Blank Solution in the right-hand pane.
  3. In the Name: textbox, type  Chapter11.Packaging as the name of the solution, as shown in the screenshot. Select a preferred location under the Location: drop-down list, or click the Browse... button and select a location. Leave the defaults as they are:

  1. Click OK
  1. Now, in the Solution Explorer (or press Ctrl + Alt + L), select Chapter11.Packaging. Right-click and select AddNew Project.
  2. In the Add New Project dialog box, expand the Visual C# node and select .NET Standard in the left-hand pane. 
  3. In the right-hand pane, select Class Library (.NET Standard), as shown here:
  1. Now, in the Name: textbox, type Chapter11.Packaging.CalcLib and leave the Location: textbox as it is: 
  1. Click OK.
  2. Now, the Solution Explorer should look like this:
  1. Click on Class1.cs and press F2 to rename it. Type Calculator.cs as the new name. 
  2. Select Yes to confirm the renaming of the class name, too.
  3. Now, add these two public methods to the class body:
      public int Add(int num1, int num2)
{
return num1 + num2;
}

public int Subtract(int num1, int num2)
{
return num1 - num2;
}
  1. Press Ctrl + Shift + B for a quick build.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.119.105.239