@@ -35,9 +35,21 @@ set VISUAL_STUDIO_BUILD_NUMBER=%~1
35
35
36
36
@ rem Install the Visual Studio Build Tools workloads and components we need
37
37
@ rem NOTE: We use the Visual Studio 2019 installer even for Visual Studio 2017 here because the old installer now breaks
38
- @ rem NOTE: VS2019 Build Tools doesn't have 4.6.2 .NET SDK and what actually gets installed is 4.8
39
- @ rem NOTE: Microsoft.NetCore.Component.SDK only exists for VS2019. And it is actually *needed* only for UE5
40
38
curl --progress-bar -L " https://aka.ms/vs/16/release/vs_buildtools.exe" --output %TEMP% \vs_buildtools.exe || goto :error
39
+
40
+ @ rem The latest Windows SDK that is available through VS2017 channel is 17763.
41
+ @ rem We want to use a newer one because:
42
+ @ rem * it allows games to use newer API
43
+ @ rem * UE-4.27 doesn't build with SDK older than 18362. See https://github.com/adamrehn/ue4-docker/issues/192
44
+ @ rem So, we always use VS2019 channel to install Windows SDK.
45
+ %TEMP% \vs_buildtools.exe --quiet --wait --norestart --nocache ^
46
+ --installPath C:\BuildTools ^
47
+ --locale en-US ^
48
+ --add Microsoft.VisualStudio.Component.Windows10SDK.20348 ^
49
+ || goto :error
50
+
51
+ @ rem VS2019 Build Tools doesn't have 4.6.2 .NET SDK and what actually gets installed is 4.8.
52
+ @ rem Microsoft.NetCore.Component.SDK only exists for VS2019. It is needed only for UE5 that can only be built with VS2019.
41
53
%TEMP% \vs_buildtools.exe --quiet --wait --norestart --nocache ^
42
54
--installPath C:\BuildTools ^
43
55
--channelUri " https://aka.ms/vs/%VISUAL_STUDIO_BUILD_NUMBER% /release/channel" ^
@@ -49,12 +61,10 @@ curl --progress-bar -L "https://aka.ms/vs/16/release/vs_buildtools.exe" --output
49
61
--add Microsoft.VisualStudio.Workload.MSBuildTools ^
50
62
--add Microsoft.VisualStudio.Component.NuGet ^
51
63
--add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 ^
52
- --add Microsoft.VisualStudio.Component.Windows10SDK.17763 ^
53
64
--add Microsoft.Net.Component.4.5.TargetingPack ^
54
65
--add Microsoft.Net.ComponentGroup.4.6.2.DeveloperTools ^
55
66
--add Microsoft.NetCore.Component.SDK
56
-
57
- python C:\buildtools-exitcode.py %ERRORLEVEL% || goto :error
67
+ || goto :error
58
68
59
69
@ rem Clean up any temp files generated during prerequisite installation
60
70
rmdir /S /Q \\?\%TEMP%
0 commit comments