private async Task LoadSolutions() { try { SolutionsStatus = "Loading..."; var solutions = _solutionManager.FindSolutions(SolutionsRoot); var list = new List <SolutionViewModel>(); await foreach (var s in solutions) { var solutionName = Path.GetFileName(s); if (_appSettings.SkipSolutions.Any(skip => skip.Equals(solutionName, StringComparison.OrdinalIgnoreCase))) { continue; } var projects = await _solutionManager.ReadSolution(s); var solutionViewModel = new SolutionViewModel(s, _solutionManager, false); foreach (var p in projects.OrderBy(x => x.Name)) { solutionViewModel.AddProject(p); } list.Add(solutionViewModel); _progressReport.Report($"Loading {solutionViewModel.Name}"); } foreach (var solution in list) { foreach (ProjectViewModel project in solution.Children) { _progressReport.Report($"Adding project references: {project.Name}"); foreach (var reference in _solutionManager.GetReferencingProjects(project.Project).OrderBy(x => x.Name)) { project.References.AddReference(reference); } } } await System.Windows.Application.Current.Dispatcher.BeginInvoke((System.Action)(() => { SolutionsCache = list.OrderBy(x => x.Name).ToList(); Solutions = SolutionsCache; SolutionsStatus = $"Solutions: {SolutionsCache.Count} | Projects: {_solutionManager.GetNumberOfCachedProjects()} | Location: {SolutionsRoot}"; ShowToastInfo("Solution loaded"); ReportReady(); })); } catch (Exception ee) { _logger.LogError(ee); await System.Windows.Application.Current.Dispatcher.BeginInvoke((Action)(() => ShowToastError("Solution loading failed"))); } }