Main Content

Add or Remove a Reference to Another Project

Add new components to your project by referencing other projects. The addition of referenced projects creates a project hierarchy. When the Project loads a referenced project in a project hierarchy, it:

  • Adds project paths from the referenced project to the MATLAB® search path.

  • Runs startup shortcuts from the referenced project.

To reference a project:

  1. On the Project tab, in the Environment section, click .

  2. In the Add Reference dialog box, specify settings:

    • Referenced project location –– Click Browse and navigate to the project folder. Then, in the project folder, select the required project (.prj) file.

    • Reference type –– If your project hierarchy has a well-defined root relative to your project root, for example, a folder under source control, click Relative. If the project you want to reference is in a location accessible to your computers, for example, a network drive, click Absolute.

    • Set a checkpoint to detect future changes –– To create a checkpoint, select the check box. To detect changes, you can compare the referenced project against this checkpoint.

  3. Click Add. The Project creates a References view that displays the referenced project.

    You can reference multiple projects in a hierarchical manner. In the References view, the Project displays the project reference hierarchy as a tree.

To view summary information about a referenced project, in the References tree, select the project.

To view files that belong to the referenced project, click .

To remove a referenced project from your project hierarchy, in the References tree, right-click the referenced project and select Remove Reference.

Related Topics