向项目添加输出引用。 该引用作为生成依赖项添加到当前项目,并被纳入到 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 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关更多信息,请参见通过部分受信任的代码使用库。