Share via


ISharePointProjectMemberReferenceCollection.Add Method (String, Guid)

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

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

Namespace:  Microsoft.VisualStudio.SharePoint
Assembly:  Microsoft.VisualStudio.SharePoint (in Microsoft.VisualStudio.SharePoint.dll)

Syntax

'Declaration
Function Add ( _
    projectPath As String, _
    itemId As Guid _
) As ISharePointProjectMemberReference
ISharePointProjectMemberReference Add(
    string projectPath,
    Guid itemId
)

Parameters

Return Value

Type: Microsoft.VisualStudio.SharePoint.ISharePointProjectMemberReference
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 nulla null reference (Nothing in Visual Basic) 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.

.NET Framework Security

See Also

Reference

ISharePointProjectMemberReferenceCollection Interface

Add Overload

Microsoft.VisualStudio.SharePoint Namespace