Create New Project From Existing Code Files Wizard

Use this wizard to create a Visual Studio project from existing code files. The project is created on your computer and all relevant files are added to the project. When you work with this new project in the Visual Studio integrated development environment (IDE), you have all the tools you need to design, develop, debug, and deploy your application. You can view, edit, build, and debug your code files using coding aids such as IntelliSense.

When you use this wizard, you will be asked to specify the details of the existing code files that will be added to the project and the application that will be created when you build the project. To access this wizard, on the File menu, select New, and then click Project From Existing Code.

Security noteSecurity Note:

Before you use existing code files to create a project, determine the trustworthiness of the code files outside of Visual Studio. Opening a project in Visual Studio automatically executes code from that project on your local machine in the fully trusted process of devenv.exe.

Welcome Page

This page introduces you to the Create Project from Existing Code Files Wizard.

  • What type of project would you like to create?
    Specifies the language of the code files that will be used to create a Visual Studio project.

Specify Project Details Page

Note

This page is for Visual Basic, Visual C#, and Visual J# projects.

On this page, you provide information about the existing code files and the application that will be created.

  • Where are the files?
    Specifies the location of the code files that will be used to create a Visual Studio project. The location can be a folder on your computer or a UNC path but not a URL.

  • Browse
    Displays the Where are the files? dialog box, which allows you to navigate to the folder that contains the existing code files.

  • Include subfolders
    Adds the files in subfolders that are of the language specified in What type of project would you like to create? on the Welcome page. Also adds files in those subfolders that are not language-specific such as text, icon, and bitmap files.

  • Name
    Specifies the project name.

  • Project file location
    Specifies the location of the project file that is created. The location can be a folder on your computer or a UNC path but not a URL.

  • Browse
    Displays the Choose the project file location dialog box, which allows you to navigate to the folder where you want to locate the project file.

  • Output type
    Specifies the type of output that is created from your project. For more information about these types of projects, see Default Project Templates in Visual Studio.

Specify Project Location and Source Files Page

Note

This page is for Visual C++ projects.

On this page, you provide information about the existing code files that will be used to create your project.

  • Project file location
    Specifies the location of the project file. The location can be a folder on your computer or a UNC path but not a URL.

    Note

    This information is required.

  • Browse
    Displays the Project file location dialog box, which allows you to navigate to the folder where you want to locate the project file.

  • Project name
    Specifies the project name.

    Note

    This information is required.

  • Add files to the project from these folders
    Recursively adds the files in the specified folders that are of the types specified in File types to add to the project.

  • Add subfolders
    Recursively adds files from the folder listed and from any subfolders.

  • Folder
    Specifies the location of the code files that will be used to create a Visual Studio project and the location of the project file. The location can be a folder on your computer or a UNC path but not a URL.

    For source code control reasons, it is recommended that files whose location can only be expressed as a relative path are added to this project. This excludes files on a different drive or computer from the project folder.

  • Add
    Displays the Add files to the project from this folder dialog box, which allows you to navigate to the folder that contains the existing code files.

  • Remove
    Removes the selected folders from the list.

  • File types to add to the project
    Specifies the types of files that are added to the project from the specified folders. You can use wildcards to specify file types.

  • Show all files in Solution Explorer
    Changes the initial view of Solution Explorer. When selected, all the files in the project folder are shown in Solution Explorer. When cleared, only the files in your project are shown.

Specify Project Settings Page

Note

This page is for Visual C++ projects.

On this page, you provide information about building the project and the application that will be created.

  • Use Visual Studio
    Specifies that the project is built using the Visual Studio IDE. For more information, see Building C++ Projects in Visual Studio.

  • Project type
    Specifies the type of project that is created. For more information about these types of projects, see Visual C++ Projects.

  • Add support for ATL
    Builds into the project support for classes in the Active Template Library (ATL).

    Note

    This option does not indicate support for adding ATL objects using the ATL code wizards. You can add ATL objects only to ATL projects or MFC projects with ATL support.

  • Add support for MFC
    Builds into the project support for the Microsoft Foundation Class (MFC) Library.

  • Add support for the Common Language Runtime
    Builds into the project support for targeting the Common Language Runtime (CLR). The project output is a mixed-mode assembly, which combines native code with managed code.

    • Common Language Runtime
      Adds support for the CLR.

    • Common Language Runtime (old syntax)
      Adds support for the CLR using the old syntax.

  • Use external build system
    Specifies that the project is built using an external build system with a specified command line. For information about command-line tools, see Building on the Command Line.

Specify Debug Configuration Settings

Note

This page is for Visual C++ projects.

On this page, you provide the settings for the debug configuration of the project.

The following options are available if you selected Use external build system on the Specify Application Details Page.

  • Build command line
    Specifies the command that runs when a build operation is performed.

  • Rebuild command line
    Specifies the command that runs when a rebuild operation is performed.

  • Clean command line
    Specifies the command that runs when a clean operation is performed.

  • Output (for debugging)
    Specifies the name of the file that is built by the project. If you do not specify a name, the .exe file extension is appended to the project name.

The following options are always available but are optional. For more information about these options, see Compiler Options Listed Alphabetically.

  • Preprocessor definitions (/D)
    Specifies the preprocessor definitions used in the source files, for example _DEBUG;WIN32.

  • Include search path (/I)
    Specifies the location of directories that contain files to be included.

  • Forced included files (FI)
    Specifies the location of specific files to be included.

  • .NET assembly search path (/AI)
    Specifies the location of directories that contain assemblies (DLLs) to be used.

  • Forced using .NET assemblies (/FU)
    Specifies the location of specific assemblies (DLLs) to be used.

Specify Release Configuration Settings

Note

This page is for Visual C++ projects.

On this page, you provide the settings for the release configuration of the project.

  • Same as debug configuration
    Sets the Release Configuration Settings to be the same as the Debug Configuration Settings. When selected, which is the default, the other options on this page are not available.

The following options are available if you cleared Same as debug configuration and selected Use external build system on the Specify Application Details Page.

  • Build command line
    Specifies the command that runs when a build operation is performed.

  • Rebuild command line
    Specifies the command that will run when a rebuild operation is performed.

  • Clean commands
    Specifies the command that runs when a clean operation is performed.

  • Output (for debugging)
    Specifies the name of the file that is built by the project. If you do not specify a name, the .exe file extension is appended to the project name.

The following options are available if you cleared Same as debug configuration but are optional. For more information about these options, see Compiler Options Listed Alphabetically.

  • Preprocessor definitions (/D)
    Specifies the preprocessor definitions used in the source files, for example _DEBUG;WIN32.

  • Include search path (/I)
    Specifies the location of directories that contain files to be included.

  • Forced included files (/FI)
    Specifies the location of specific files to be included.

  • .NET assembly search path (/AI)
    Specifies the location of directories that contain assemblies (DLLs) to be used.

  • Forced using .NET assemblies (/FU)
    Specifies the location of specific assemblies (DLLs) to be used.

See Also

Tasks

How to: Create a Project from Existing Code Files

How to: Create a C++ Project from Existing Code

Other Resources

Projects, User Interface Elements