Helix Core is now P4. Product user interfaces will be updated soon. Learn more >>

P4 for Visual Studio Documentation | 2025.1

# Put a project or solution under P4 Server source control

P4 for Visual Studio requires that your work be included in a project or solution file.

Make sure that your project or solution and all files included in it reside in the workspace (your client directory) being used by your P4 Server connection.

The way to put the project or solution under P4 Server source control depends on your configuration:

- If P4 for Visual Studio is the active source control provider but is not set to automatically add new files to P4 Server, select the Add to source control using P4 for Visual Studio check box in the New Project dialog when you create the solution. This causes P4 for Visual Studio to mark the files for add. You then only need to submit the pending changelist. For details, see Option 1: Existing project or solution with P4 for Visual Studio as active source control provider.
- If P4 for Visual Studio is the active source control provider and set to automatically add new files to P4 Server, P4 for Visual Studio automatically marks the files for add when you create the solution, regardless of whether the Add to source control using P4 for Visual Studio check box in the New Project dialog is selected. You then only need to submit the pending changelist. For details, see Option 2: New project or solution with P4 for Visual Studio as active source control provider.

- If P4 for Visual Studio is not the active source control provider, use the Publish option (Visual Studio 2015) or the Add to Source Control option (Visual Studio 2017) in the status bar, available after you create the solution. Note that this option is not available in Visual Studio 2013.

  For details, see Option 3: New project or solution without P4 for Visual Studio as active source control provider.

For more configuration information, see Set P4 for Visual Studio preferences.

## Option 1: Existing project or solution with P4 for Visual Studio as active source control provider

1. In the Solution Explorer, select the project or solution that should be placed under source control.
2. Follow the procedure described in Add files to the depot.

## Option 2: New project or solution with P4 for Visual Studio as active source control provider

1. In the New Project dialog, if P4 for Visual Studio is not set to automatically put files under P4 Server source control, select the Add to source control using P4 for Visual Studio check box under the Browse button.

2. Click OK.

   If you are offline, the Open Connection dialog opens; continue with step 3. Otherwise, continue with step 4.

3. In the Open Connection dialog, enter your P4 Server connection settings and click OK.

   P4 for Visual Studio opens the project or solution and any related files for add.

4. Continue with submitting the changelist.

## Option 3: New project or solution without P4 for Visual Studio as active source control provider

1. In the status bar, at the bottom right of the window, click Publish (Visual Studio 2015) or Add to Source Control (Visual Studio 2017), and then select P4 for Visual Studio - P4 for Visual Studio.

   Note that this option is not available in Visual Studio 2013.

2. In the Open Connection dialog, enter your P4 Server connection settings and click OK.

   The files in the Solution Explorer now display a red plus sign to indicate that they are marked for add.

   The Add to Source Control option in the bottom right of the window changes to 1 Pending Change or X Pending Changes (if you have other pending changelists in addition to the default changelist).

3. Continue with submitting the changelist.

Your search for returned results