IReadOnlyList<Tuple<string, string>> result = [];
//A list of Tuple instances containing two strings.
//The first string: full path to the .aprx. In case of Portal projects,
//this is the cached location of the project on the local machine.
//Second string: url for portal projects
result = Project.GetRecentProjectsEx();
foreach (var project in result)
{
string projectPath;
string projectName;
string projectUrl;
if (!string.IsNullOrEmpty(project.Item2))
{
//this is a portal project
//Url
projectUrl = project.Item2;
//local cached location of the portal project
projectPath = project.Item1;
}
else
{
//this is a local project
//path to local project
projectPath = project.Item1;
}
projectName = new FileInfo(project.Item1).Name;
}