Putting a project or solution under Helix Server source control
P4VS 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 Helix Server connection.
The way to put the project or solution under Helix Server source control depends on your configuration:
- If P4VS is the active source control provider but is not set to automatically add new files to Helix Server, select the Add to source control using P4VS check box in the New Project dialog when you create the solution. This causes P4VS 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 P4VS as active source control provider.
- If P4VS is the active source control provider and set to automatically add new files to Helix Server, P4VS automatically marks the files for add when you create the solution, regardless of whether the Add to source control using P4VS 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 P4VS as active source control provider.
-
If P4VS 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 P4VS as active source control provider.
For more configuration information, see Setting P4VS preferences.
Option 1: Existing project or solution with P4VS as active source control provider
- In the Solution Explorer, select the project or solution that should be placed under source control.
- Follow the procedure described in Adding files to the depot.
Option 2: New project or solution with P4VS as active source control provider
- In the New Project dialog, if P4VS is not set to automatically put files under Helix Server source control, select the Add to source control using P4VS check box under the Browse button.
-
Click OK.
If you are offline, the Open Connection dialog opens; continue with step 3. Otherwise, continue with step 4.
-
In the Open Connection dialog, enter your Helix Server connection settings and click OK.
P4VS opens the project or solution and any related files for add.
- Continue with submitting the changelist.
Option 3: New project or solution without P4VS as active source control provider
-
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 P4VS - Helix Plugin for Visual Studio.
Note that this option is not available in Visual Studio 2013.
-
In the Open Connection dialog, enter your Helix 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).
- Continue with submitting the changelist.