共用方式為


Solution.RemoveProjectReference(ProjectId, ProjectReference) 方法

定義

建立新的方案實例,並將指定的專案更新為不再包含指定的專案參考。

public:
 Microsoft::CodeAnalysis::Solution ^ RemoveProjectReference(Microsoft::CodeAnalysis::ProjectId ^ projectId, Microsoft::CodeAnalysis::ProjectReference ^ projectReference);
public Microsoft.CodeAnalysis.Solution RemoveProjectReference (Microsoft.CodeAnalysis.ProjectId projectId, Microsoft.CodeAnalysis.ProjectReference projectReference);
member this.RemoveProjectReference : Microsoft.CodeAnalysis.ProjectId * Microsoft.CodeAnalysis.ProjectReference -> Microsoft.CodeAnalysis.Solution
Public Function RemoveProjectReference (projectId As ProjectId, projectReference As ProjectReference) As Solution

參數

projectId
ProjectId
projectReference
ProjectReference

傳回

例外狀況

projectReferencenull

方案不包含 projectId

適用於