Chapter 2. Building your first .NET Core applications

 

This chapter covers

  • Installing the .NET Core SDK
  • Using the .NET CLI
  • Creating and executing a .NET Core application

In this chapter, you’ll learn how to set up your development environment, create an application, and deploy that application to another machine. You’ll start by installing the .NET Core SDK, which includes the .NET Command-Line Interface (CLI) that’s used throughout this book. From there, you’ll create a console application and an ASP.NET web application. Then you’ll deploy those applications.

Note for early adopters

If you’ve experimented with .NET Core in the past, you may have used DNVM, DNU, or DNX. Although these tools were useful in the beginning, they had a few problems and inconsistencies. They have been deprecated in favor of the .NET CLI.

2.1. The trouble with development environments

There’s something special about development environments. They accumulate a combination of tools, files, and settings that allow your application to work perfectly during development but fail mysteriously everywhere else. Testers get frustrated when I tell them, “It works on my machine.” I’ve been in several situations where a test was “flaky,” sometimes working and sometimes not, only to discover that one of the build machines in the pool didn’t have a component installed.

2.2. Installing the .NET Core SDK

 

2.3. Creating and running the Hello World console application

 
 
 

2.4. Creating an ASP.NET Core web application

 
 
 

2.5. Creating an ASP.NET Core website from the template

 

2.6. Deploying to a server

 
 

2.7. Development tools available for .NET Core

 

Additional resources

 
 

Summary

 
 
 
 
sitemap

Unable to load book!

The book could not be loaded.

(try again in a couple of minutes)

manning.com homepage
test yourself with a liveTest