Example #1
0
        protected override void Execute()
        {
            IVsHierarchy selection = ThreadHelper.JoinableTaskFactory.Run(() => SelectionService.GetCurrentSelectionAsync(new CancellationToken()));

            if (selection is IVsBrowseObjectContext browseObject)
            {
                BrowseObject = browseObject;

                using (ProjectWriteLockReleaser access = ThreadHelper.JoinableTaskFactory.Run(async() => await Locker.WriteLockAsync()))
                {
                    string filePath = BrowseObject.UnconfiguredProject.FullPath;

                    ProjectXmlService.SetExplicitSdkImportsIfNecessaryAsync(filePath);
                }
            }
        }