.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!
- See Updates with C# 10 and .NET 6
- See [Updates with C# 11 and .NET 7]../../Dotnet7Updates.md)
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.
.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