From f086c3f130d033f2349a14457e271596f351bb2f Mon Sep 17 00:00:00 2001
From: Sankhesh Jhaveri <sankhesh.jhaveri@kitware.com>
Date: Wed, 27 Sep 2023 13:09:44 -0400
Subject: [PATCH] msvc: Allow building with Visual Studio Preview versions

---
 build.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/build.py b/build.py
index f4a95deee8..7c3e349cf8 100755
--- a/build.py
+++ b/build.py
@@ -126,7 +126,7 @@ def FindLatestMSVC( quiet ):
     if not quiet:
       print( "Calling vswhere -latest -installationVersion" )
     latest_full_v = subprocess.check_output(
-      [ VSWHERE_EXE, '-latest', '-property', 'installationVersion' ]
+      [ VSWHERE_EXE, '-latest', '-prerelease', '-property', 'installationVersion' ]
     ).strip().decode()
     if '.' in latest_full_v:
       try: