File tree Expand file tree Collapse file tree 2 files changed +18
-5
lines changed Expand file tree Collapse file tree 2 files changed +18
-5
lines changed Original file line number Diff line number Diff line change @@ -106,6 +106,19 @@ jobs:
106106 - name : Add MSBuild to PATH
107107 uses : microsoft/setup-msbuild@v2
108108
109+ - name : Setup Windows 10 SDK
110+ uses : GuillaumeFalourd/setup-windows10-sdk-action@v2
111+ with :
112+ sdk-version : 22621
113+
114+ - name : Setup Visual Studio environment
115+ shell : cmd
116+ run : |
117+ "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" -latest -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath > vs.txt
118+ set /p VSPATH=<vs.txt
119+ echo APPINSIGHTS_VS_PATH=%VSPATH%>>%GITHUB_ENV%
120+ echo APPINSIGHTS_WIN10_SDK_PATH=C:\Program Files (x86)\Windows Kits\10>>%GITHUB_ENV%
121+
109122 - name : Assemble
110123 # javadoc task fails sporadically fetching https://docs.oracle.com/javase/8/docs/api/
111124 run : >
Original file line number Diff line number Diff line change @@ -13,12 +13,12 @@ if (System.env.APPINSIGHTS_WIN10_SDK_PATH) {
1313 winSdkDir = System . env. APPINSIGHTS_WIN10_SDK_PATH
1414 logger. info " Windows SDK path set with environment variable, APPINSIGHTS_WIN10_SDK_PATH"
1515}
16- // Visual Studio 2022 Build Tools path for GitHub Actions windows-2022 runners
17- def vsToolsDir = " $programFilesX86 /Microsoft Visual Studio/2022/BuildTools"
18-
16+ // Visual Studio Build Tools path - use environment variable if available, fallback to standard path
17+ def vsToolsDir = System . env. APPINSIGHTS_VS_PATH ?: " $programFilesX86 /Microsoft Visual Studio/2022/BuildTools"
1918if (System . env. APPINSIGHTS_VS_PATH ) {
20- vsToolsDir = System . env. APPINSIGHTS_VS_PATH
21- logger. info " Visual Studio Build Tools path set with environment variable, APPINSIGHTS_VS_PATH"
19+ logger. info " Visual Studio Build Tools path set with environment variable: $vsToolsDir "
20+ } else {
21+ logger. info " Using default Visual Studio Build Tools path: $vsToolsDir "
2222}
2323
2424logger. info " Windows SDK: $winSdkDir "
You can’t perform that action at this time.
0 commit comments