Visual Studio Productivity Tips: Create a project from existing code


Do you know that, you can create a project from existing code in Visual Studio? In this part of my Visual Studio Productivity Tips series, we will learn how to create a project and/or a solution from existing code. If you want to create a project from your existing code, follow the below mentioned steps. - Article authored by Kunal Chowdhury on .

If you have some existing code files and want to club them in a single project/solution, adding those one by one to a project is time consuming. Do you know that Visual Studio provides you a wizard for doing this activity?

 

In this part of my Visual Studio Productivity Tips series, we will learn how to create a project and/or a solution from existing code.


Visual Studio Productivity Tips:


 

Visual Studio Productivity Tips: How to create a project from existing code in Visual Studio

 

If you want to create a project from your existing code, follow the below mentioned steps:

  1. Open your Visual Studio IDE.

  2. Navigate to the Visual Studio menu: File | New | Project From Existing Code... as shown in the below screenshot:

    Navigate to the Visual Studio menu: File | New | Project From Existing Code...

  3. This will open the Create New Project from Existing Code Files wizard dialog on the screen.

  4. As shown below, select the type of project (Visual Basic or Visual C#) that you would like to create, and then click Next > button to continue.

    Select the type of project (Visual Basic or Visual C#) that you would like to create, and then click 'Next' button to continue

  5. In the next screen, select the location of your code files and specify the details about your project. This includes name of the project and the output type (Console Application, Windows Application or Class Library). Here's a screenshot for your reference:

    In the next screen, select the location of your code files and specify the details about your project.

  6. Once done, click the Finish button.

 

That's all! Visual Studio will now create the project, add the nested files and folders in the project. Once done, you will be able to see the project and all its associated files in the Visual Studio Solution Explorer.

 

I hope that the post was helpful. If you didn't try this yet, check out the quick steps. Its really very easy to create a new project from existing code.

 

 

Have a question? Or, a comment? Let's Discuss it below...

dhgate

Thank you for visiting our website!

We value your engagement and would love to hear your thoughts. Don't forget to leave a comment below to share your feedback, opinions, or questions.

We believe in fostering an interactive and inclusive community, and your comments play a crucial role in creating that environment.