Sdílet prostřednictvím


ISharePointProjectMemberReferenceCollection.Add(String, Guid) Method

Definition

Creates a reference to a project item and adds it to this collection.

public:
 Microsoft::VisualStudio::SharePoint::ISharePointProjectMemberReference ^ Add(System::String ^ projectPath, Guid itemId);
public Microsoft.VisualStudio.SharePoint.ISharePointProjectMemberReference Add (string projectPath, Guid itemId);
abstract member Add : string * Guid -> Microsoft.VisualStudio.SharePoint.ISharePointProjectMemberReference
Public Function Add (projectPath As String, itemId As Guid) As ISharePointProjectMemberReference

Parameters

projectPath
String

The path of the project.

itemId
Guid

The ID of the project item.

Returns

The project item reference added to the collection.

Remarks

This path should be relative to the current project. That is, the project to which the reference, not the referenced item, belongs.

If the path is null or empty, then the current project is assumed.

Paths can be absolute, but it is not recommended because it risks tying a solution to a specific development system.

Applies to