ISharePointProjectOutputReferenceCollection.Add 方法 (Guid, DeploymentType)

將輸出參考加入至 projectId 所指定的專案。 此參考會當做目前專案的組建相依性加入,並併入為 SharePoint 專案項目的一部分。

命名空間:  Microsoft.VisualStudio.SharePoint
組件:  Microsoft.VisualStudio.SharePoint (在 Microsoft.VisualStudio.SharePoint.dll 中)

語法

'宣告
Function Add ( _
    projectId As Guid, _
    deploymentType As DeploymentType _
) As ISharePointProjectOutputReference
ISharePointProjectOutputReference Add(
    Guid projectId,
    DeploymentType deploymentType
)

參數

  • projectId
    型別:System.Guid
    Visual Studio 方案中的每一個專案都有唯一的 ID。此參數代表要當成參考而加入的專案 ID。projectId 所指定的專案應該在方案中載入,才能讓此方法正確運作。

傳回值

型別:Microsoft.VisualStudio.SharePoint.ISharePointProjectOutputReference
已加入的參考。

例外狀況

例外狀況 條件
ArgumentException

如果找到具有指定之 projectId 的專案,就會發生。

.NET Framework 安全性

請參閱

參考

ISharePointProjectOutputReferenceCollection 介面

Add 多載

Microsoft.VisualStudio.SharePoint 命名空間