Copilot commented on code in PR #51610:
URL: https://github.com/apache/arrow/pull/51610#discussion_r4131097975


##########
dev/release/verify-release-candidate.bat:
##########
@@ -84,8 +84,9 @@ set PATH=%INSTALL_DIR%\bin;%PATH%
 mkdir !ARROW_SOURCE!\cpp\build
 pushd !ARROW_SOURCE!\cpp\build
 
-@rem This is the path for Visual Studio Community 2017
-call "C:\Program Files\Microsoft Visual 
Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
+@REM Setup MSVC environment. Find the Visual Studio Path first.
+for /f "usebackq delims=" %%i in (`"%ProgramFiles(x86)%\Microsoft Visual 
Studio\Installer\vswhere.exe" -latest -property installationPath`) do set 
"VS_INSTALL_PATH=%%i"
+call "%VS_INSTALL_PATH%\VC\Auxiliary\Build\vcvarsall.bat" x64 || exit /B 1

Review Comment:
   This now selects the latest Visual Studio instance, but this script still 
configures CMake with `Visual Studio 17 2022` (see `GENERATOR` above). On the 
VS2026-only Windows image that motivated this change, `vcvarsall.bat` can 
succeed while CMake still fails because the VS17 generator is unavailable; 
please select a generator matching the discovered instance or constrain 
`vswhere` to a VS2022 installation for this script.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to