diff --git a/src/Coree.VisualStudio.DotnetToolbar/CommandDeleteBinObj.cs b/src/Coree.VisualStudio.DotnetToolbar/CommandDeleteBinObj.cs index 949e5f7..f863cd1 100644 --- a/src/Coree.VisualStudio.DotnetToolbar/CommandDeleteBinObj.cs +++ b/src/Coree.VisualStudio.DotnetToolbar/CommandDeleteBinObj.cs @@ -75,6 +75,29 @@ internal override async System.Threading.Tasks.Task StartDotNetProcessAsync() await PaneClearAsync(); + if (CoreeVisualStudioDotnetToolbarPackage.Instance.Settings.SolutionSettingsGeneral.BlockNonSdkExecute) + { + var projectInfos = (await GetProjectInfosAsync()).Where(e => e.SolutionDirectoryItemNameLocationExists == true).ToList(); + + bool found = false; + foreach (var item in projectInfos) + { + if (item.IsSdkStyle == false) + { + await PaneWriteLineAsync("-------------------------------------------------------------------------------"); + await PaneWriteLineAsync($"Non SDK style project file {item.VSProjectLocation} !"); + await PaneWriteLineAsync("-------------------------------------------------------------------------------"); + found = true; + } + } + if (found) + { + await PaneWriteLineAsync("Done"); + return; + } + } + + var VSProjects = (await GetProjectInfosAsync()).Where(e => e.IsVSProjectType == true).ToList(); if (!CoreeVisualStudioDotnetToolbarPackage.Instance.Settings.SolutionSettingsConfirmDialog.DisableConfirmDialog)