MetadataReferenceResolver.ResolveMissingAssembly 方法

定义

解析缺少的程序集引用。

public:
 virtual Microsoft::CodeAnalysis::PortableExecutableReference ^ ResolveMissingAssembly(Microsoft::CodeAnalysis::MetadataReference ^ definition, Microsoft::CodeAnalysis::AssemblyIdentity ^ referenceIdentity);
public virtual Microsoft.CodeAnalysis.PortableExecutableReference ResolveMissingAssembly (Microsoft.CodeAnalysis.MetadataReference definition, Microsoft.CodeAnalysis.AssemblyIdentity referenceIdentity);
public virtual Microsoft.CodeAnalysis.PortableExecutableReference? ResolveMissingAssembly (Microsoft.CodeAnalysis.MetadataReference definition, Microsoft.CodeAnalysis.AssemblyIdentity referenceIdentity);
abstract member ResolveMissingAssembly : Microsoft.CodeAnalysis.MetadataReference * Microsoft.CodeAnalysis.AssemblyIdentity -> Microsoft.CodeAnalysis.PortableExecutableReference
override this.ResolveMissingAssembly : Microsoft.CodeAnalysis.MetadataReference * Microsoft.CodeAnalysis.AssemblyIdentity -> Microsoft.CodeAnalysis.PortableExecutableReference
Public Overridable Function ResolveMissingAssembly (definition As MetadataReference, referenceIdentity As AssemblyIdentity) As PortableExecutableReference

参数

definition
MetadataReference

元数据定义 (程序集或模块) ,用于在其依赖项列表中声明程序集引用 referenceIdentity

referenceIdentity
AssemblyIdentity

无法针对编译中显式指定的元数据引用解析的程序集引用的标识。

返回

如果无法解析标识,则解析引用或 null。

适用于