diff --git a/dnSpy/dnSpy/Documents/DsDocumentService.cs b/dnSpy/dnSpy/Documents/DsDocumentService.cs index ace44b01f1..ed856aaa2c 100644 --- a/dnSpy/dnSpy/Documents/DsDocumentService.cs +++ b/dnSpy/dnSpy/Documents/DsDocumentService.cs @@ -163,6 +163,13 @@ static AssemblyNameComparerFlags ToAssemblyNameComparerFlags(FindAssemblyOptions foreach (var info in documents) { if (comparer.Equals(info.Document.AssemblyDef, assembly)) return info.Document; + + if (info.Document is DsBundleDocument) { + foreach (var documentChild in info.Document.Children) { + if (comparer.Equals(documentChild.AssemblyDef, assembly)) + return documentChild; + } + } } foreach (var info in documents) { if (info.IsAlternativeAssemblyName(assembly)) @@ -224,6 +231,13 @@ DocumentInfo Find_NoLock(IDsDocumentNameKey key) { foreach (var info in documents) { if (key.Equals(info.Document.Key)) return info; + + if (info.Document is DsBundleDocument) { + foreach (var documentChild in info.Document.Children) { + if (key.Equals(documentChild.Key)) + return new DocumentInfo(documentChild); + } + } } return default; }