I am using the sample logic to get recent projects
var fileInfos = Project.GetRecentProjects().Select(f => new FileInfo(f));
But I want to know how to clear this list in code. I want to update the user.config that stores the recent projects. ArcGIS Pro does this when you try and open a recent project that no longer exists. If you click on one, it will prompt you and ask you if you want to remove the project. I have made a custom start page that loads the recent projects, but when a user clicks on a recent project from the list (that has been deleted from system), ArcGIS Pro Crashes.
I have attached the out of the box Prompt behavior that i want to mimic in the Pro SDK.
I haven't dug into this in a while. I never could get it to clear the list of projects. I am sure there is a way to edit the xml. I have to remove them manually. I just delete RecentProjects items from the file user.config in the directory
The StrongName Folder name and version will vary of course, but goto %localappdata%l\ESRI\ and find the strongname folder and version.
I also like to cleanup my projects too.