private void SetupSolution() { // create file watcher before loading projects var oldTestFilesUpdateWatcher = _testFilesUpdateWatcher; _testFilesUpdateWatcher = new TestFilesUpdateWatcher(); _testFilesUpdateWatcher.FileChangedEvent += OnProjectItemChanged; oldTestFilesUpdateWatcher?.Dispose(); var solution = (IVsSolution)_serviceProvider.GetService(typeof(SVsSolution)); // add all source files foreach (var project in VsProjectExtensions.EnumerateLoadedProjects(solution)) { LoadProject(project); } _setupComplete = true; }
private void SetupSolution() { // create file watcher before loading projects var oldTestFilesUpdateWatcher = _testFilesUpdateWatcher; _testFilesUpdateWatcher = new TestFilesUpdateWatcher(); _testFilesUpdateWatcher.FileChangedEvent += OnProjectItemChanged; oldTestFilesUpdateWatcher?.Dispose(); try { // add all source files var solution = (IVsSolution)_serviceProvider.GetService(typeof(SVsSolution)); foreach (var project in VsProjectExtensions.EnumerateLoadedProjects(solution)) { LoadProject(project); } } catch (Exception ex) when(!ex.IsCriticalException()) { Trace.WriteLine("Exception : " + ex.Message); } _setupComplete = true; }