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
    要作为引用添加的项目。应将此项目加载到解决方案中,以便此方法可正常工作。

返回值

类型:Microsoft.VisualStudio.SharePoint.ISharePointProjectOutputReference
添加的引用。

异常

异常 条件
ArgumentNullException

当参数 projectFullPath 为 nullnull 引用(在 Visual Basic 中为 Nothing) 时发生。

ArgumentException

当参数 projectFullPath 为 nullnull 引用(在 Visual Basic 中为 Nothing) 或找不到没有相应的项目时发生。

.NET Framework 安全性

请参见

参考

ISharePointProjectOutputReferenceCollection 接口

Add 重载

Microsoft.VisualStudio.SharePoint 命名空间