Build Method

Visual Studio .NET 2003

Rebuilds a project or creates an application file (.app), dynamic-link library (.dll), or executable file (.exe) from a project.

Object.Build([cOutputName] [, nBuildAction] [, lRebuildAll]   
[, lShowErrors] [, lBuildNewGUIDs])

Parameters

cOutputName
Specifies the name of the application, dynamic-link library, or executable file that is created.

If cOutputName includes a file extension and nBuildAction is omitted, the file extension in cOutputName determines the type of file built. For example, if the extension in cOutputName is ".exe", an executable file is created.

nBuildAction
Specifies that the project is rebuilt or generates an application, a dynamic-link library, or an executable file.

The following table lists the values for nBuildAction with a description of each.

nBuildAction FoxPro.H Constant Description
1 BUILDACTION_REBUILD (Default) Rebuilds the project
2 BUILDACTION_BUILDAPP Creates an .app
3 BUILDACTION_BUILDEXE Creates an .exe
4 BUILDACTION_BUILDDLL Creates a .dll
5 BUILDACTION_BUILDMTDLL Creates a multithreaded .dll

If cOutPutName doesn't include an extension, the appropriate extension is added.

lRebuildAll
Specifies whether files in the project are recompiled before an .app, .dll, or .exe is created. If lRebuildAll is True (.T.), the following are recompiled:
  • Program files
  • Format files
  • Source code in forms, labels, reports, and visual class libraries
  • Stored procedures in databases

If If lRebuildAll is False (.F.) or is omitted, files in the project are not recompiled before the .app, .dll, or .exe is created.

lShowErrors
Specifies whether compilation errors are displayed in an editing window after the build is complete. If lShowErrors is True (.T.), the errors are displayed. If lShowErrors is False (.F.) or is omitted, compilation errors aren't displayed.
lBuildNewGUIDs
Specifies whether new registry GUIDs (globally unique identifiers) are generated when an executable file or dynamic-link library is created. If lBuildNewGUIDs is True (.T.), new GUIDs are generated. If lBuildNewGUIDs is False (.F.) or is omitted, new GUIDs aren't generated. lBuildNewGUIDs is ignored if nBuildAction is less than 3.

Remarks

A logical True (.T.) is returned if the project is successfully rebuilt, or an .app, .dll, or .exe is successfully created without errors; otherwise False (.F.) is returned.

See Also

BUILD APP | BUILD DLL | BUILD EXE | BUILD PROJECT | CREATE PROJECT | MODIFY PROJECT | Refresh Method

Applies To: Project Object

Show: