How to create .NET console program

Once you have dotnet SDK installed, you can create your first program.

To create a console project run

dotnet new console -o MyApp
create dotnet console project

This will create MyApp folder with 2 files inside. Program.cs is a basic program that prints “Hello World” text in the console.

Advertisement

dotnet application directory structure

To run the dotnet project, you can use the command

dotnet run
running dotnet application
Add a comment

Leave a Reply

Your email address will not be published. Required fields are marked *

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Advertisement