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 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关更多信息,请参见通过部分受信任的代码使用库。