public void TestCanPublish_False(KnownProjectTypes invalidKnownProjectType)
        {
            bool result = PublishDialogWindow.CanPublish(
                Mock.Of <IParsedProject>(p => p.ProjectType == invalidKnownProjectType));

            Assert.IsFalse(result);
        }
        private void OnBeforeQueryStatus(object sender, EventArgs e)
        {
            var menuCommand = sender as OleMenuCommand;

            if (menuCommand == null)
            {
                return;
            }

            // Ensure that the menu entry is only available for ASP.NET Core projects.
            var selectedProject = SolutionHelper.CurrentSolution.SelectedProject;

            if (selectedProject == null || !PublishDialogWindow.CanPublish(selectedProject))
            {
                menuCommand.Visible = false;
            }
            else
            {
                menuCommand.Visible = true;
                menuCommand.Enabled = !ShellUtils.IsBusy();
            }
        }