diff --git a/ICSharpCode.Decompiler/CSharp/RequiredNamespaceCollector.cs b/ICSharpCode.Decompiler/CSharp/RequiredNamespaceCollector.cs index 459a71a142..bdb77fab44 100644 --- a/ICSharpCode.Decompiler/CSharp/RequiredNamespaceCollector.cs +++ b/ICSharpCode.Decompiler/CSharp/RequiredNamespaceCollector.cs @@ -137,11 +137,13 @@ void CollectNamespaces(IEntity entity, MetadataModule module, CodeMappingInfo ma break; case IProperty property: HandleAttributes(property.GetAttributes()); + CollectNamespacesForTypeReference(property.ReturnType); CollectNamespaces(property.Getter, module, mappingInfo); CollectNamespaces(property.Setter, module, mappingInfo); break; case IEvent @event: HandleAttributes(@event.GetAttributes()); + CollectNamespacesForTypeReference(@event.ReturnType); CollectNamespaces(@event.AddAccessor, module, mappingInfo); CollectNamespaces(@event.RemoveAccessor, module, mappingInfo); break;