Skip to content

Run and observe output

Context: Run the Hello World app using dotnet run and observe the output. This verifies your .NET 10 setup.

Run your Hello World application using dotnet run and observe the output.

Terminal window
cd HelloWorld
dotnet run
Terminal window
Hello World
// Modify Program.cs
Console.WriteLine("Welcome to .NET 10!");
Console.WriteLine($"Current time: {DateTime.Now}");
Terminal window
Welcome to .NET 10!
Current time: 4/8/2026 10:30:45 AM
  • Command not found: .NET SDK not installed or not in PATH
  • Build errors: Check syntax in Program.cs
  • Wrong directory: Ensure you’re in the project folder with .csproj
Terminal window
# Rebuild and run
dotnet clean
dotnet build
dotnet run