kunal-chowdhury.com

Visual Studio Productivity Tips: Create a project from existing code


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.

 

 


Kunal Chowdhury
If you have come this far, it means that you liked what you are reading (Visual Studio Productivity Tips: Create a project from existing code).

Why not reach little more and connect with me directly on Twitter, Facebook, Google+ and LinkedIn. I would love to hear your thoughts and opinions.

Authored Books: