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

返回

例外

metadataReference 上声明的默认值为 null

项目不包含指定的引用。

适用于