فهرست منبع

Merge pull request #27271 from shartte/fix-msbuild-detection

Add support for new MSBuild directory naming introduced in VS 2019
Ignacio Roldán Etcheverry 6 سال پیش
والد
کامیت
b0fbefe9da
1فایلهای تغییر یافته به همراه8 افزوده شده و 0 حذف شده
  1. 8 0
      modules/mono/utils/mono_reg_utils.cpp

+ 8 - 0
modules/mono/utils/mono_reg_utils.cpp

@@ -29,6 +29,7 @@
 /*************************************************************************/
 
 #include "mono_reg_utils.h"
+#include "core/os/dir_access.h"
 
 #ifdef WINDOWS_ENABLED
 
@@ -200,6 +201,13 @@ String find_msbuild_tools_path() {
 						val += "\\";
 					}
 
+					// Since VS2019, the directory is simply named "Current"
+					String msBuildDirectory = val + "MSBuild\\Current\\Bin";
+					if (DirAccess::exists(msBuildDirectory)) {
+						return msBuildDirectory;
+					}
+
+					// Directory name "15.0" is used in VS 2017
 					return val + "MSBuild\\15.0\\Bin";
 				}
 			}