diff --git a/Source/cmVSSetupHelper.cxx b/Source/cmVSSetupHelper.cxx index 809117e11d..92661346ca 100644 --- a/Source/cmVSSetupHelper.cxx +++ b/Source/cmVSSetupHelper.cxx @@ -450,7 +450,8 @@ bool cmVSSetupAPIHelper::EnumerateAndChooseVSInstance() // Enumerate VS instances with either COM interface or Vswhere if (!EnumerateVSInstancesWithCOM(vecVSInstancesAll) && - !EnumerateVSInstancesWithVswhere(vecVSInstancesAll)) { + !EnumerateVSInstancesWithVswhere(vecVSInstancesAll) && + this->SpecifiedVSInstallLocation.empty()) { return false; }