UbGames

How To Create a C# Project in Visual Studio

new cs projecct

In this article, you will learn how to create a new C# project in Visual Studio 2022.

If you haven’t already installed Visual Studio, go to the Visual Studio 2022 downloads page to install it or visit our tutorial “How to Install Visual Studio”.

First, you need to open Visual Studio 2022.

You will create a C# Windows Forms project. The project will come with all the template files you need, before you add anything.

Create a project

Once you have Visual Studio open, you create a new project by choosing File > New > Project on the menu bar.

Next, you will see the Create a new project dialog.

create new project

On the Create a new project dialog, a list of your recently selected templates will appear on the left. The templates are sorted by most recently used.

You can select from recently used templates, also you can filter all available project templates by Language (for example, C# or C++), Platform (for example, Windows or Azure), and Project type (for example, Desktop or Web).

For this project we need to filter our template by the C# language, Windows platform, and Desktop project type.

On the Create a new project window, below the template search box, enter the type of project you want to create.

  • Select C# from the ALL languages drop-down list.
  • Select Windows from the ALL platforms drop-down list.
  • Select Desktop from the ALL project types drop-down list.

Then select “Windows forms App” and click the “Next” button.

Next, you will see the Configure your new project dialog.

configure new project

The Configure your new project dialog has options to name your project (and solution), select a disk location, and more.

In the Configure your new project window, enter the project name, location, and solution name for the new project, then click the “Next” button.

Next, you will see the Additional information dialog.

project information

In the Additional information window, .NET 6.0 (Long-term support) should already be selected for your target framework. If not, select .NET 6.0 (Long-term support). Then, choose Create.

Visual Studio creates the project and solution, then opens the project with a form, The form is called a Windows user interface and where you add controls to create the application.

winform project

You’re ready to start coding!

ubgames

Create a C# Project in Visual Studio