• stuartmorgan's avatar
    Use vswhere to find Visual Studio (#33448) · aecf053e
    stuartmorgan authored
    Rather than hard-coding a set of locations to check, use vswhere (which
    is installed by VS 2017 and later), and construct the vcvars64.bat path
    relative to that. This will allow Windows builds to work without special
    configuration for people who have VS installed at a custom path.
    
    Also adds error logging with different messages for each failure point,
    so that rather than the not-very-informative 'failed to find
    vcvars64.bat' message, the failure will provide feedback about what to
    do.
    
    This is an interim solution; later this will be replaced by a
    VisualStudio class with associated validator to match the structure of
    the other toolchains.
    
    Fixes #33249
    aecf053e
msbuild_utils.dart 4.23 KB