diff --git a/.github/workflows/build-on-tag.yml b/.github/workflows/build-on-tag.yml index a2b86c4..40a1c6b 100644 --- a/.github/workflows/build-on-tag.yml +++ b/.github/workflows/build-on-tag.yml @@ -13,13 +13,14 @@ jobs: - name: Checkout the code uses: actions/checkout@v3 - - name: Set up Visual Studio 2022 - uses: microsoft/setup-msbuild@v1 - with: - vs-version: '2022' + - name: Locate MSBuild + id: locate-msbuild + run: | + echo "##[set-output name=vs-path;]$(vswhere -latest -products * -requires Microsoft.Component.MSBuild -property installationPath)" + echo "MSBuild located at ${{ steps.locate-msbuild.outputs.vs-path }}" - name: Build the solution - run: msbuild /t:Build /p:Configuration=Release /p:Platform=x64 YourSolution.sln + run: ${{ steps.locate-msbuild.outputs.vs-path }}\MSBuild\Current\Bin\MSBuild.exe /t:Build /p:Configuration=Release /p:Platform=x64 YourSolution.sln - name: Archive build artifacts uses: actions/upload-artifact@v3