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 命名空间