microsoft / setup-msbuild

A GitHub Action to facilitate configuring MSBuild in the workflow PATH for building .NET Framework applications.
MIT License
335 stars 89 forks source link

Error: Unable to find MSBuild. #80

Closed CartBlanche closed 2 years ago

CartBlanche commented 2 years ago

I'm trying to build VS2019 extension and previously (about a month ago) specifying vs-version [16.0, 17.0) worked. But since about just over a week ago, this has stopped working.

I updated my yml to the following....

with:
    vs-version: [16.5, 16.11)
    msbuild-architecture: x86

But I still get the following error....

C:\ProgramData\Chocolatey\bin\vswhere.exe -products * -requires Microsoft.Component.MSBuild -property installationPath -latest -version "[16.[5](https://github.com/WildernessLabs/VS_Win_Meadow_Extension/runs/5423178303?check_suite_focus=true#step:6:5), 1[6](https://github.com/WildernessLabs/VS_Win_Meadow_Extension/runs/5423178303?check_suite_focus=true#step:6:6).11)"
Error: Unable to find MSBuild.

Any suggestions what vs-version will work for VS2019?

My VS2020 extension builds just fine when specifying [17.0, 18.0).

timheuer commented 2 years ago

Hi @CartBlanche! Two notes for you:

1) if you need VS2019 then use windows-2019 agent machines 2) unless you are installing more versions on the machine then you can omit vs-version as there is currently only ever one version on hosted agents.

CartBlanche commented 2 years ago

@timheuer Thanks. I've amended our CI accordingly.