Chapter 3. Creating an application using .NET 10.0
To ensure your development tools are properly configured, you can create a basic "Hello World" application. This process tests the core functionality of the .NET SDK, ensuring that you can successfully generate, build, and run projects from the command line.
Learn how to create a C# "Hello World" application.
Prerequisites
- Installed .NET 10.0 SDK
Procedure
Create a new console application in a directory named
<my-app>:dotnet new console --output <my-app>
$ dotnet new console --output <my-app>Copy to Clipboard Copied! Toggle word wrap Toggle overflow Run the application from its project directory:
dotnet run --project <my-app>
$ dotnet run --project <my-app>Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Verification
Verify that the application runs and displays the expected output:
Hello World!
Hello World!Copy to Clipboard Copied! Toggle word wrap Toggle overflow