Share via


BUILD PROJECT Command

Creates a Visual FoxPro project table (.pjx) file by opening, processing, and including one or more specified program, menu, report, label, form, or library files in the project. A Visual FoxPro project consists of a .pjx file and a project memo (.pjt) file. You can also use BUILD PROJECT to rebuild a project.

BUILD PROJECT ProjectFileName [RECOMPILE] 
   [FROM ProgramName1 | MenuName1 | ReportName1 | LabelName1 | 
            FormName1 | LibraryName1 [, ProgramName2 | MenuName2 | 
            ReportName2 | LabelName2 | FormName2 | LibraryName2 ...]]

Parameters

  • ProjectFileName
    Specifies the name of the project file to create.

  • [RECOMPILE]
    Compiles all files in the project.

    If RECOMPILE is omitted, only the files that have been modified are compiled when the project is built.

  • [FROM ProgramName1| MenuName1| ReportName1| LabelName1| FormName1| LibraryName1]
    Specifies the files to include in the project. You can specify one or more program, menu, report, label, form, or library files. By default, the first executable program or menu file in the FROM clause is the master program file.

    Tip

    To rebuild a project, omit the FROM clause. Visual FoxPro refreshes the files in the specified project.

Remarks

A Visual FoxPro project keeps track of files in the project as well as the dependencies, references, and relationships between them. After you specify files to include in a project, Visual FoxPro ensures that the application project is based on the latest source files. Each file included in the project contains a time and date stamp so you can refresh the project when you make changes to files in the project or when dependencies change. This practice helps ensure that any applications created from a project always use the most recent source files. When Visual FoxPro encounters a program, menu, or form file when creating a project using BUILD PROJECT, it locates the corresponding compiled file and compares the time and date stamp of the two files. If the time and date stamp of the source file is later than that of the compiled file, Visual FoxPro recompiles the source file.

When you use BUILD PROJECT, Visual FoxPro reports unresolved references and other errors, which do not prevent the project from being created. This makes it possible for you to build a project even when all the necessary pieces have not yet been created or are not available. You can correct unresolved references or other errors later by refreshing the project file or by manually modifying the information stored in the project file using MODIFY PROJECT.

You can create the following redistributable application files from projects: application (.app) files, executable (.exe) files, or dynamic-link library (.dll) files. However, before you create redistributable application files, you should test your project. For more information, see How to: Test a Project. For more information on building redistributable application files, see Compiling an Application.

See Also

Reference

CREATE PROJECT Command

MODIFY PROJECT Command

BUILD APP Command

BUILD EXE Command

BUILD DLL Command

BUILD MTDLL Command

Build Method

EXTERNAL Command

Other Resources

Working with Projects

Commands (Visual FoxPro)

Language Reference (Visual FoxPro)