Skip to content

Commit

Permalink
non sdk block for delete
Browse files Browse the repository at this point in the history
  • Loading branch information
carsten-riedel committed Nov 23, 2023
1 parent 2404601 commit f11312e
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions src/Coree.VisualStudio.DotnetToolbar/CommandDeleteBinObj.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit f11312e

Please sign in to comment.