Getting ready

Start off by creating a new project in Visual Studio 2017. Under Visual C#, select the .NET Core node and click on the ASP.NET Core Web Application.... Click on OK:

You will then be presented with the project template selection. You can choose to create an empty application, a Web API (allows you to create an HTTP-based API), or a full Web Application. Select the Empty template, make sure that Host in the cloud is unchecked, and and click on OK:

Note how the templates window allows you to enable Docker support. Docker allows you to develop applications inside containers that contain a complete file system and everything else required to run your application. This means that your software will always function exactly the same, regardless of the environment it is in. For more on Docker, visit www.docker.com.

When your ASP.NET Core application is created, your Solution Explorer will look as follows:

If you are running Visual Studio 2017 RC, what you need to do is click on Tools, NuGet Package Manager, Manage NuGet Packages for Solution... and see if there are any updates to .NET Core. If you are on .NET Core 1.01, there should be an update to .NET Core 1.1 available via NuGet. Let NuGet update your project dependencies for you. After doing this, you must browse to https://www.microsoft.com/net/download/core#/current  and make sure that you have selected the Current option under All downloads. Download the current .NET Core SDK installer for Windows and install it.

At this point, you can press Ctrl + F5 to Start without Debugging and launch your ASP.NET Core application. This will start IIS Express, which is the default host for ASP.NET Core applications. The only thing it does now is to display the text Hello World!. You have successfully created and run an ASP.NET Core application. Don't close your browser yet. Keep it open:

Note that the port number 25608 in the URL of the browser is a randomly selected port. The port number you will see will most likely be different than in the book.
..................Content has been hidden....................

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