BUILD PROJECT Command
Creates and builds a project file.
BUILD PROJECT ProjectFileName [RECOMPILE] [FROM ProgramName1 | MenuName1 | ReportName1 | LabelName1 | FormName1 | LibraryName1 [, ProgramName2 | MenuName2 | ReportName2 | LabelName2 | FormName2 | LibraryName2 ...]]
- Specifies the name of the project table to be created.
- 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 and the project will keep track of these files, as well as the dependencies, references, and connections among them.
The first executable program or menu file in the FROM clause is the master program file in the project by default.
BUILD PROJECT automatically creates a project table with a .pjx file name extension by opening and processing one or more program, menu, report, label, form, or library files that you specify. You can use the project file to create one of two program types: an application file with an .app extension or an executable file with an .exe extension. The project table keeps track of all the files required to create an application, as well as the dependencies, references, and connections among the files. Once you specify the pieces in the project, Visual FoxPro makes sure that the application is based on the latest source files.
For more information on building projects, see Compiling an Application.
When Visual FoxPro encounters a program, menu, or form file while creating a project file from BUILD PROJECT, it finds its 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.
Each project file contains a time and date stamp so you can refresh the project file when you make changes to files in the project or when dependencies change. This practice helps to guarantee that any applications created from a project file will always use the most recent source files. To refresh a project file, issue BUILD PROJECT without the optional FROM clause. Visual FoxPro then updates the specified project.
When you issue BUILD PROJECT, unresolved references and other errors are reported but do not prevent the project file from being created. This enables you to build a project even when all the necessary pieces aren't actually created or available at the time the project is built. Unresolved references or other problems can be corrected by refreshing the project file at a later date, or by manually modifying the information stored in the project file with MODIFY PROJECT.