private void InitializeResetInteractiveFromProjectCommand(OleMenuCommandService menuCommandService)
        {
            var resetInteractiveFromProjectCommand = new OleMenuCommand(
                (sender, args) =>
            {
                var resetInteractive = new VsResetInteractive(
                    (DTE)this.GetService(typeof(SDTE)),
                    _componentModel,
                    (IVsMonitorSelection)this.GetService(typeof(SVsShellMonitorSelection)),
                    (IVsSolutionBuildManager)this.GetService(typeof(SVsSolutionBuildManager)),
                    CreateReference,
                    CreateImport);

                var vsInteractiveWindow = _interactiveWindowProvider.Open(instanceId: 0, focus: true);

                EventHandler focusWindow = null;
                focusWindow = (s, e) =>
                {
                    // We have to set focus to the Interactive Window *after* the wait indicator is dismissed.
                    vsInteractiveWindow.Show(focus: true);
                    resetInteractive.ExecutionCompleted -= focusWindow;
                };

                resetInteractive.Execute(vsInteractiveWindow.InteractiveWindow, LanguageName + " Interactive");
                resetInteractive.ExecutionCompleted += focusWindow;
            },
                GetResetInteractiveFromProjectCommandID());

            resetInteractiveFromProjectCommand.Supported = true;

            resetInteractiveFromProjectCommand.BeforeQueryStatus += (_, __) =>
            {
                var project   = GetActiveProject();
                var available = project != null && project.Kind == ProjectKind;

                resetInteractiveFromProjectCommand.Enabled   = available;
                resetInteractiveFromProjectCommand.Supported = available;
                resetInteractiveFromProjectCommand.Visible   = available;
            };

            menuCommandService.AddCommand(resetInteractiveFromProjectCommand);
        }
        public void ExecuteResetInteractive()
        {
            var resetInteractive = new VsResetInteractive(
                        (DTE)this.GetService(typeof(SDTE)),
                        _componentModel,
                        (IVsMonitorSelection)this.GetService(typeof(SVsShellMonitorSelection)),
                        (IVsSolutionBuildManager)this.GetService(typeof(SVsSolutionBuildManager)),
                        CreateReference,
                        CreateImport);

            var vsInteractiveWindow = _interactiveWindowProvider.Open(instanceId: 0, focus: true);

            EventHandler focusWindow = null;
            focusWindow = (s, e) =>
            {
                // We have to set focus to the Interactive Window *after* the wait indicator is dismissed.
                vsInteractiveWindow.Show(focus: true);
                resetInteractive.ExecutionCompleted -= focusWindow;
            };

            resetInteractive.Execute(vsInteractiveWindow.InteractiveWindow, LanguageName + " Interactive");
            resetInteractive.ExecutionCompleted += focusWindow;
        }