I've tried 2 different ways of trying to get a list of VS's MRU items (projects and solutions) using code from this post: VSSDK Howto Fill MRUList into MRUListBox.
ExternalSettingsManager
var vsExePath = AppDomain.CurrentDomain.BaseDirectory + "devenv.exe";
var mruPath = @"MRUItems\{a9c4a31f-f9cb-47a9-abc0-49ce82d0b3ac}\Items";
using (ExternalSettingsManager ext = ExternalSettingsManager.CreateForApplication(vsExePath))
{
var store = ext.GetReadOnlySettingsStore(SettingsScope.UserSettings);
var mruList = new ArrayList();
var names = store.GetPropertyNames(mruPath);
foreach (string name in names)
{
string value = store.GetString(mruPath, name);
string[] subValue = value.Split('|');
mruList.Add(subValue[0]);
}
}
store.GetPropertyNames(mruPath) always throws a "Value does not fall within the expected range" error.
IVsMRUItemsStore.GetMRUItems(VSConstants.MruList.Projects, "")
var maxItems = 50;
var guid = VSConstants.MruList.Projects;
var mruItems = new string[maxItems];
var itemsStore = (IVsMRUItemsStore)await VS.Shell.GetMRUItemsStoreAsync();
var projectCount = itemsStore.GetMRUItems(ref guid, "", dwMaxResults: (uint)maxItems, rgbstrItems: mruItems);
projectCount is always zero, and there are no items in mruItems
Sadly I was unable to download the working sample project that @DylanZhu-MSFT had kindly uploaded. After I've been made to sign-in, the link returns:
We're sorry, but <my email address> can't be found in the microsoftapc-my.sharepoint.com directory. Please try again later, while we try to automatically fix this for you.
It looks like the sample project is hosted on Dylan's private Microsoft SharePoint site. I'd REALLY like to be able to try out that sample!

Has anyone successfully been able to use either of these methods to get MRU items from VS? Or can anyone see a flaw in either my code or the original code here?