ISharePointProjectOutputReferenceCollection.Add 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
Add(ISharePointProject, DeploymentType) |
将输出引用添加到项目中。 引用作为生成依赖项添加到当前项目,并包含在 SharePoint 项目项内。 |
Add(Guid, DeploymentType) |
将输出引用添加到 |
Add(String, DeploymentType) |
将输出引用添加到项目中。 引用作为生成依赖项添加到当前项目,并包含在 SharePoint 项目项内。 |
Add(ISharePointProject, DeploymentType)
将输出引用添加到项目中。 引用作为生成依赖项添加到当前项目,并包含在 SharePoint 项目项内。
public:
Microsoft::VisualStudio::SharePoint::ISharePointProjectOutputReference ^ Add(Microsoft::VisualStudio::SharePoint::ISharePointProject ^ project, Microsoft::VisualStudio::SharePoint::DeploymentType deploymentType);
public Microsoft.VisualStudio.SharePoint.ISharePointProjectOutputReference Add (Microsoft.VisualStudio.SharePoint.ISharePointProject project, Microsoft.VisualStudio.SharePoint.DeploymentType deploymentType);
abstract member Add : Microsoft.VisualStudio.SharePoint.ISharePointProject * Microsoft.VisualStudio.SharePoint.DeploymentType -> Microsoft.VisualStudio.SharePoint.ISharePointProjectOutputReference
Public Function Add (project As ISharePointProject, deploymentType As DeploymentType) As ISharePointProjectOutputReference
参数
- project
- ISharePointProject
要添加为引用的项目。
- deploymentType
- DeploymentType
DeploymentType 枚举值指定的部署类型。
返回
已添加的引用。
例外
当 project
参数为 null
时发生。
适用于
Add(Guid, DeploymentType)
将输出引用添加到 projectId
指定的项目。 引用作为生成依赖项添加到当前项目,并包含在 SharePoint 项目项内。
public:
Microsoft::VisualStudio::SharePoint::ISharePointProjectOutputReference ^ Add(Guid projectId, Microsoft::VisualStudio::SharePoint::DeploymentType deploymentType);
public Microsoft.VisualStudio.SharePoint.ISharePointProjectOutputReference Add (Guid projectId, Microsoft.VisualStudio.SharePoint.DeploymentType deploymentType);
abstract member Add : Guid * Microsoft.VisualStudio.SharePoint.DeploymentType -> Microsoft.VisualStudio.SharePoint.ISharePointProjectOutputReference
Public Function Add (projectId As Guid, deploymentType As DeploymentType) As ISharePointProjectOutputReference
参数
- projectId
- Guid
在 Visual Studio 解决方案中,每个项目都具有唯一的 ID。 此参数表示要添加为引用的项目的 ID。 应将 指定的 projectId
项目加载到解决方案中,以便此方法正常工作。
- deploymentType
- DeploymentType
DeploymentType 枚举值指定的部署类型。
返回
已添加的引用。
例外
找不到任何具有指定 projectId
的项目时会发生。
适用于
Add(String, DeploymentType)
将输出引用添加到项目中。 引用作为生成依赖项添加到当前项目,并包含在 SharePoint 项目项内。
public:
Microsoft::VisualStudio::SharePoint::ISharePointProjectOutputReference ^ Add(System::String ^ projectFullPath, Microsoft::VisualStudio::SharePoint::DeploymentType deploymentType);
public Microsoft.VisualStudio.SharePoint.ISharePointProjectOutputReference Add (string projectFullPath, Microsoft.VisualStudio.SharePoint.DeploymentType deploymentType);
abstract member Add : string * Microsoft.VisualStudio.SharePoint.DeploymentType -> Microsoft.VisualStudio.SharePoint.ISharePointProjectOutputReference
Public Function Add (projectFullPath As String, deploymentType As DeploymentType) As ISharePointProjectOutputReference
参数
- projectFullPath
- String
要添加为引用的项目。 为了让此方法正常运行,解决方案中应加载该项目。
- deploymentType
- DeploymentType
DeploymentType 枚举值指定的部署类型。
返回
已添加的引用。
例外
当参数 projectFullPath
为 null
时会发生。
当参数 projectFullPath
为 null
或找不到任何相应的项目时会发生