microsoft / BuildXL

Microsoft Build Accelerator
MIT License
917 stars 146 forks source link

Build scripts incorrectly report that Visual Studio 2017 build tools are required #1303

Closed joshuagl closed 2 years ago

joshuagl commented 2 years ago

When running bxl.cmd without appropriate prerequisites installed a user receives an error message that "Prerequisite Visual Studio 2017 build tools not found at any of the following locations: ..."

However the DScript Public\Sdk\Experimental\Msvc\VisualCpp\visualCpp.dsc is actually checking for Visual Studio 2019 build tools, as documented in the developer guide.

Here's a simple diff to resolve the issue:

--- a/Public/Sdk/Experimental/Msvc/VisualCpp/visualCpp.dsc
+++ b/Public/Sdk/Experimental/Msvc/VisualCpp/visualCpp.dsc
@@ -77,7 +77,7 @@ function createMsvcTool(exe: PathAtom, description: string) : Transformer.ToolDe

 /**
  * When building internally, returns the VisualCppTools.Internal.VS2017Layout package.
- * When building externally, search for the Visual Studio 2017 build tools directory.
+ * When building externally, search for the Visual Studio 2019 build tools directory.
  */
 function getMsvcPackage() : StaticDirectory {
     // The VisualCppTools.Community.VS2017Layout package has been deprecated for external users.
@@ -114,6 +114,6 @@ function getMsvcPackage() : StaticDirectory {
             }
         }

-        Contract.fail(`Prerequisite Visual Studio 2017 build tools not found at any of the following locations: '${buildToolsDirectories}'. Please see BuildXL/Documentation/Wiki/DeveloperGuide.md on how to acquire these tools for building externally.`);
+        Contract.fail(`Prerequisite Visual Studio 2019 build tools not found at any of the following locations: '${buildToolsDirectories}'. Please see BuildXL/Documentation/Wiki/DeveloperGuide.md on how to acquire these tools for building externally.`);
     }
 }
\ No newline at end of file
joshuagl commented 2 years ago

Fixed in e7d3663 🎉