共用方式為


Solution.RemoveMetadataReference(ProjectId, MetadataReference) 方法

定義

使用已更新的專案建立新的方案實例,不再包含指定的中繼資料參考。

public:
 Microsoft::CodeAnalysis::Solution ^ RemoveMetadataReference(Microsoft::CodeAnalysis::ProjectId ^ projectId, Microsoft::CodeAnalysis::MetadataReference ^ metadataReference);
public Microsoft.CodeAnalysis.Solution RemoveMetadataReference (Microsoft.CodeAnalysis.ProjectId projectId, Microsoft.CodeAnalysis.MetadataReference metadataReference);
member this.RemoveMetadataReference : Microsoft.CodeAnalysis.ProjectId * Microsoft.CodeAnalysis.MetadataReference -> Microsoft.CodeAnalysis.Solution
Public Function RemoveMetadataReference (projectId As ProjectId, metadataReference As MetadataReference) As Solution

參數

projectId
ProjectId
metadataReference
MetadataReference

傳回

例外狀況

metadataReferencenull

專案不包含指定的參考。

適用於