From eb82ebf6b0e50cff821875af66eee028a5ab39a5 Mon Sep 17 00:00:00 2001 From: Dean Ellis Date: Wed, 11 Feb 2026 18:24:46 +0000 Subject: [PATCH 1/3] Add code to check directories for executables --- Tasks/TestWindowsTask.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Tasks/TestWindowsTask.cs b/Tasks/TestWindowsTask.cs index fa46054..dc4e148 100644 --- a/Tasks/TestWindowsTask.cs +++ b/Tasks/TestWindowsTask.cs @@ -30,7 +30,15 @@ public override void Run(BuildContext context) { var vswhere = new VSWhereLatest(context.FileSystem, context.Environment, context.ProcessRunner, context.Tools); var devcmdPath = vswhere.Latest(new VSWhereLatestSettings()).FullPath + @"\Common7\Tools\vsdevcmd.bat"; + CheckDir(context, context.ArtifactsDir); + } + private void CheckDir(BuildContext context, string devcmdPath, string dir) + { + foreach (var dirPath in Directory.GetDirectories(dir)) + { + CheckDir(context, devcmdPath, dirPath); + } // Ensure there are files to test otherwise this will always pass var files = Directory.GetFiles(context.ArtifactsDir); From e11a505f91f1c2f8f278fc58c8e981a8d714f9a9 Mon Sep 17 00:00:00 2001 From: Dean Ellis Date: Wed, 11 Feb 2026 18:31:28 +0000 Subject: [PATCH 2/3] fix build error --- Tasks/TestWindowsTask.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tasks/TestWindowsTask.cs b/Tasks/TestWindowsTask.cs index dc4e148..159ff3f 100644 --- a/Tasks/TestWindowsTask.cs +++ b/Tasks/TestWindowsTask.cs @@ -30,7 +30,7 @@ public override void Run(BuildContext context) { var vswhere = new VSWhereLatest(context.FileSystem, context.Environment, context.ProcessRunner, context.Tools); var devcmdPath = vswhere.Latest(new VSWhereLatestSettings()).FullPath + @"\Common7\Tools\vsdevcmd.bat"; - CheckDir(context, context.ArtifactsDir); + CheckDir(context, devcmdPath, context.ArtifactsDir); } private void CheckDir(BuildContext context, string devcmdPath, string dir) From 731d2ed9ed2b34b9cebc64ec6d3c3241eb081610 Mon Sep 17 00:00:00 2001 From: Dean Ellis Date: Wed, 11 Feb 2026 18:41:20 +0000 Subject: [PATCH 3/3] remove error --- Tasks/TestWindowsTask.cs | 5 ----- 1 file changed, 5 deletions(-) diff --git a/Tasks/TestWindowsTask.cs b/Tasks/TestWindowsTask.cs index 159ff3f..d459a6d 100644 --- a/Tasks/TestWindowsTask.cs +++ b/Tasks/TestWindowsTask.cs @@ -42,11 +42,6 @@ private void CheckDir(BuildContext context, string devcmdPath, string dir) // Ensure there are files to test otherwise this will always pass var files = Directory.GetFiles(context.ArtifactsDir); - if (files is null || files.Length == 0) - { - throw new Exception("There are no files in the artifacts directory to test"); - } - foreach (var filePath in files) { context.Information($"Checking: {filePath}");