Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

Latest commit

 

History

History

Overview-Tools-Acquisition

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Overview, Tools and Acquisition (30 minutes)

We'll get started with a quick overview of .NET Core: what it is, why you should care, and how to get set up to start using it.

Prerequisites

Visual Studio 2019 Preview

It’s best if you have Visual Studio 2019 16.1 Preview 3 (free Community level is fine), since there are some new desktop tooling enhancements in the recent previews. You’ll need the following workloads:

  • ASP.NET and web development
  • .NET desktop development
  • Mobile development with .NET
  • .NET Core cross-platform development

You can check to see what workloads you have installed by just running the installer (from the start menu, bring up Visual Studio Installer and click on Modify for Visual Studio 2019 Preview if installed).

Visual Studio Code

.NET Core 3.0 SDK

Install the latest .NET Core 3.0 SDK for your operating system.

Overview Presentation

Creating a new .NET Core console application using Command Line tools

  1. From the command line, run dotnet new console
  2. Type dotnet run to run the application. You'll see a simple "Hello World" message.

Exploring and Editing the Application using Visual Studio Code

  1. Type code . to launch Visual Studio Code in the current directory.
  2. Take a look at the Program.cs file.
  3. Change the "Hello World" message to "Hello .NET".
  4. Switch to the console and type dotnet run to to see the update.

Creating a new .NET Core application using Visual Studio 2019

  1. Follow the steps in the Building a complete .NET Core solution on Windows, using Visual Studio 2019 tutorial.

    Note: If you'd like simpler one to get started, you can first complete the Building a C# Hello World application with .NET Core in Visual Studio 2017 tutorial.

Extra Credit: Create a Class Library and Xunit test solution

List available options from dotnet new:

dotnet new

Now create a solution with a class library and a test project:

dotnet new sln -o MyApp
cd MyApp
dotnet new classlib -o MyApp
dotnet new xunit -o MyApp.Test
dotnet sln add MyApp/MyApp.csproj
dotnet sln add MyApp.Test/MyApp.Test.csproj
cd MyApp.Test
dotnet add reference ../MyApp/MyApp.csproj
dotnet restore
dotnet build
dotnet test