Create A New Console Project In Visual Studio Code

This is a basic article for those who have just started using visual studio code. As a developer, you are already familiar that visual studio code has no option to create a new project. You can create a new file or open a project folder, so this article explains how we can create that.

What is Visual Studio Code?

Visual Studio Code (VS Code) is a free, open-source code editor developed by Microsoft. It provides a user-friendly and customizable interface for coding in various programming languages such as Python, Java, C++, and many others.

One of the key features of VS Code is its extensibility. It allows users to install extensions that enhance their coding experience and productivity, such as additional language support, debuggers, linters, and Git integration. VS Code also has a built-in terminal and support for integrated version control.

Another advantage of VS Code is its cross-platform compatibility, which means it can run on different operating systems such as Windows, macOS, and Linux. Overall, VS Code is a popular choice among developers due to its user-friendly interface, extensive customization options, and powerful functionality.

Getting Started,

First thing first, open the command prompt and create a new project name folder,

Create a new folder in a given directory.

 Go into the newly created folder using the given command.

Time to get in Visual studio code for the newly created folder. Type the following command.

As the folder opened in visual studio code, let’s install a few extensions now. In VS code, there is an extension option. Click on that.

Search for C# extension and click Install.

Next, install .NET Code in your system. https://dotnet.microsoft.com/en-us/download/dotnet/3.1

Now you are all set with the extension. Let’s go to VS Code terminal now to create a new project. Go to Terminal and click New Terminal.

Write the following command to create a new console project.

Once the command runs successfully, you can see some compiler files have been added to the solution.

Open Program.cs class file, as you can see, there is a Hello World message.

Go to notification and this message pops up automatically, Click Yes to install other required assets.

After installing the required assets, the solution looks like this.

For the safe side, run the restore command if anything is missing.

As everything is up to date, it’s time to run the project to see the result and run a command.

That being said, the project is set up and compiled successfully. As you can see in the result, “Hello, World!” is the output we mentioned in Program.cs class.

Conclusion

This article taught us how to create a new Console Project using Visual Studio Code using Command Prompt.


Similar Articles