Skip to content

Latest commit

 

History

History
39 lines (24 loc) · 1.5 KB

File metadata and controls

39 lines (24 loc) · 1.5 KB

Readme - Code Samples for Chapter 1, .NET Applications and Tools

.NET Applications and Tools covers what you need to know to create .NET applications. You learn about the .NET CLI and create a Hello World application using C# top-level statements.

This chapter contains the following code samples:

  • HelloWorld (.NET Core Console App)
  • WebApp (Tool-generated ASP.NET Core Web App)
  • SelfContainedHelloWorld (Console App configured for self-contained deployment)
  • TrimmedHelloWorld

For code comments and issues please check Professional C#'s GitHub Repository

Please check my blog csharp.christiannagel.com for additional information for topics covered in the book.

Thank you!

Updates with C# 10 and C# 11

To see all templates available with dotnet new:

dotnet new list

With .NET 7, --list is deprecated (but still works), and list should be used instead.

Self Contained Hello World

.NET Runtime Identifier Catalog

Page 22 - The option --self-contained is now required with (since .NET 6):

dotnet publish --self-contained -c Release -r win10-x64
dotnet publish --self-contained -c Release -r osx.10.13-x64
dotnet publish --self-contained -c Release -r linux-x64