Did you know – You can create a project from existing code files in Visual Studio. Consider you have some existing files and you want to execute them quickly. In that case, you can use the “Create a Project from Existing Code” wizard in Visual Studio. Visual Studio will ask for source file location, languages for project and type of project you want to create. Using this feature, you can quickly create a project from sample code files for prototyping or quick testing.
Create a Project from Existing Code Files
To start with, from the Main Menu of Visual Studio, Navigate to File > New > Project from Existing Code
This will bring the “Create New Project from Existing Code Files” Wizard.
In this screen, you only need to select the project language Visual Basic or Visual C# and click on Next.
In the next screen, choose the source file location, the name of project and type of project you want to create the code file.
That’s it. Visual Studio will create the projects for the selected type automatically.
Hope this helps.