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