Click File | New | Project and select Web in the right-hand pane under Visual C#.
Select ASP.NET Core Web Application in the right-hand pane:
Now, in the Name: textbox, type Chapter12.Azure.WebAppCore, and, under the Location: textbox, select a proper location and leave the other fields as they are:
Click OK.
In the New ASP.NET Core Web Application dialog box, select Empty and leave the other fields as they are:
Click OK.
The Solution Explorer (Ctrl + Alt + L) should look like this:
Now, right-click on the Dependencies label.
Select Manage NuGet Packages.
Click Browse and, in the search box, type the Package ID you have selected while uploading.
In this case, Packt_DotNetStandard_CookBook_Chap1, and press Enter:
Now, click on the package.
Click the Install button in the right-hand pane:
Click OK in the confirmation dialog box.
After a successful installation, the output window should look like this:
Now, in the Solution Explorer, expand the Dependencies | NuGet tab and you should see our library there:
Now, double-click on the Startup.cs button to reach the code window.
Scroll up till you see the using directives.
Add the following directive at the end of the using directives:
using Chapter11.Packaging.CalcLib;
Now, scroll down till you reach the app.Run() method inside the Configure() method.
Replace the code with this:
var calculator = new Calculator(); var answer = calculator.Add(10, 50);
await context.Response.WriteAsync($"Answer for 10+50 is {answer}");