MetadataReferenceResolver.ResolveMissingAssembly 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
解析缺少的程序集引用。
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。