

NET Core at the Select environment prompt. Select Run > Add Configuration from the menu.If you don't get the prompt, or if you accidentally dismiss it without selecting Yes, do the following steps to create launch.json and tasks.json: vscode folder with launch.json and tasks.json files. Select Yes, and Visual Studio Code creates a. cs file, Visual Studio Code prompts you to add the missing assets to build and debug your app. Replace the contents of Program.cs with the following code: namespace HelloWorld The project template creates a simple application that displays "Hello, World" in the console window by calling the Console.WriteLine(String) method in Program.cs. In the Terminal, enter the following command: dotnet new console -framework net7.0 The Terminal opens with the command prompt in the HelloWorld folder.

Open the Terminal in Visual Studio Code by selecting View > Terminal from the main menu. In the Do you trust the authors of the files in this folder? dialog, select Yes, I trust the authors. You'll add code later in the tutorial that assumes the project namespace is HelloWorld. The folder name becomes the project name and the namespace name by default. Then click Select Folder ( Open on macOS). In the Open Folder dialog, create a HelloWorld folder and select it. NET console app project named "HelloWorld". For information about how to install extensions on Visual Studio Code, see VS Code Extension Marketplace.Ĭreate a.
