When implementing a IVsSingleFileGenerator, I would expect the below service call to return all types within scope. However, types declared locally (within the project) are not returned. Am I doing something wrong, is this a bug or something else?
DynamicTypeService typeService = (DynamicTypeService)ServiceProvider.GlobalProvider.GetService(typeof(DynamicTypeService));
IVsSolution vsSolution = (IVsSolution)ServiceProvider.GlobalProvider.GetService(typeof(IVsSolution));
IVsHierarchy hier;
vsSolution.GetProjectOfUniqueName(currentProject.UniqueName, out hier);
ITypeResolutionService trs = (ITypeResolutionService)typeService.GetTypeDiscoveryService(hier);
ITypeDiscoveryService tds = (ITypeDiscoveryService)typeService.GetTypeDiscoveryService(hier);
Type t = trs.GetType("MyNamespace.MyEnum");