ISharePointProjectOutputReferenceCollection.Add 方法 (String, DeploymentType)
將輸出參考加入至專案。 此參考會當做目前專案的組建相依性加入,並併入為 SharePoint 專案項目的一部分。
命名空間: Microsoft.VisualStudio.SharePoint
組件: Microsoft.VisualStudio.SharePoint (在 Microsoft.VisualStudio.SharePoint.dll 中)
語法
'宣告
Function Add ( _
projectFullPath As String, _
deploymentType As DeploymentType _
) As ISharePointProjectOutputReference
ISharePointProjectOutputReference Add(
string projectFullPath,
DeploymentType deploymentType
)
參數
- projectFullPath
型別:System.String
當成參考加入的專案。該專案應該在方案中載入,才能讓此方法正確運作。
- deploymentType
型別:Microsoft.VisualStudio.SharePoint.DeploymentType
DeploymentType 列舉值所指定的部署類型。
傳回值
型別:Microsoft.VisualStudio.SharePoint.ISharePointProjectOutputReference
已加入的參考。
例外狀況
例外狀況 | 條件 |
---|---|
ArgumentNullException | 在 projectFullPath 參數為 nullNull 參照 (即 Visual Basic 中的 Nothing) 時發生。 |
ArgumentException | 如果參數 projectFullPath 為 nullNull 參照 (即 Visual Basic 中的 Nothing),或是找不到對應的專案,就會發生 |
.NET Framework 安全性
- 完全信任立即呼叫者。這個成員無法供部分信任的程式碼使用。如需詳細資訊,請參閱從部分受信任程式碼使用程式庫。