diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a37dd05..9df0f8d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -40,10 +40,18 @@ jobs: vs-prerelease: true msbuild-architecture: 'x64' + - name: Setup MSBuild (arm64) + id: setup_msbuild_path_arm + uses: ./ + with: + vs-prerelease: true + msbuild-architecture: 'arm64' + - name: echo msbuild path run: | echo "vswhere-path: ${{ steps.setup_msbuild_explicit.outputs.msbuildPath }}" echo "PATH: ${{ steps.setup_msbuild_path.outputs.msbuildPath }}" + echo "ARM PATH: ${{ steps.setup_msbuild_path_arm.outputs.msbuildPath }}" echo "Fallback: ${{ steps.setup_msbuild_fallback.outputs.msbuildPath }}" - name: echo MSBuild diff --git a/dist/index.js b/dist/index.js index 896c586..ddbe47d 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1701,9 +1701,9 @@ function run() { stdout: (data) => { const installationPath = data.toString().trim(); core.debug(`Found installation path: ${installationPath}`); - // x64 only exists in one possible location, so no fallback probing - if (MSBUILD_ARCH === "x64") { - let toolPath = path.join(installationPath, 'MSBuild\\Current\\Bin\\amd64\\MSBuild.exe'); + // x64 and arm64 only exist in one possible location, so no fallback probing + if (MSBUILD_ARCH === 'x64' || MSBUILD_ARCH === 'arm64') { + let toolPath = path.join(installationPath, 'MSBuild\\Current\\Bin\\${MSBUILD_ARCH}\\MSBuild.exe'); core.debug(`Checking for path: ${toolPath}`); if (!fs.existsSync(toolPath)) { return; diff --git a/src/main.ts b/src/main.ts index ca61573..8237e14 100644 --- a/src/main.ts +++ b/src/main.ts @@ -71,12 +71,12 @@ async function run(): Promise { const installationPath = data.toString().trim() core.debug(`Found installation path: ${installationPath}`) - // x64 only exists in one possible location, so no fallback probing - if (MSBUILD_ARCH === "x64") { + // x64 and arm64 only exist in one possible location, so no fallback probing + if (MSBUILD_ARCH === 'x64' || MSBUILD_ARCH === 'arm64') { let toolPath = path.join( installationPath, - 'MSBuild\\Current\\Bin\\amd64\\MSBuild.exe' - ); + 'MSBuild\\Current\\Bin\\${MSBUILD_ARCH}\\MSBuild.exe' + ) core.debug(`Checking for path: ${toolPath}`) if (!fs.existsSync(toolPath)) { return