Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
ASP.NET Core 2 Fundamentals

You're reading from   ASP.NET Core 2 Fundamentals Build cross-platform apps and dynamic web services with this server-side web application framework

Arrow left icon
Product type Paperback
Published in Aug 2018
Publisher
ISBN-13 9781789538915
Length 298 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Authors (2):
Arrow left icon
Onur Gumus Onur Gumus
Author Profile Icon Onur Gumus
Onur Gumus
Mugilan T. S. Ragupathi Mugilan T. S. Ragupathi
Author Profile Icon Mugilan T. S. Ragupathi
Mugilan T. S. Ragupathi
Arrow right icon
View More author details
Toc

Installing the ASP.NET Core NuGet Package in Your Application


We'll straight away jump to installing the ASP.NET Core NuGet package in your application.

Follow these steps to install the NuGet package of ASP.NET MVC:

  1. Right-click on the dependencies, and select the Manage NuGet Packages option:
  1. We will see that a package called Microsoft.ASPNetCore.All is installed (as shown in the following screenshot). This package is actually a meta package that installs most of the dependencies we need.
  1. If we extend this package from dependencies, we will see:

So, everything we need is already installed regardless of using an empty project or not.

ASP.NET Core is installed in our application. Now, we need to tell our application to use ASP.NET MVC.

This needs a couple of changes to the Startup.cs file:

  1. Configure the application to add the MVC service. This can be done by adding the following line to the ConfigureServices method of the Startup class:

Note

Go to https://goo.gl/RPXUaw to access the code.

public void...
You have been reading a chapter from
ASP.NET Core 2 Fundamentals
Published in: Aug 2018
Publisher:
ISBN-13: 9781789538915
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime