MSBuild failures with Azure DevOps despite this build working locally.
Steps to reproduce
Selecting a build for MSBuild and attempting to run a build as of now does not work as intended, the only thing I need to do is attempt running a build definition, but attempting to browse around there doesn't seem to be any real clear indication of why this would be happening. Browsing around and doing my own digging, the general consensus seems to indicate that this error primarily seems to be the result of having the wrong versions, but I have verified that my version is in fact the same as what I'm selected (unless latest somehow doesn't mean 16 here).
The error given clearly indicates that it is unable to see the version, but I can confirm that
Expected behavior
The build to complete correctly as expected, as using Build Tools 2019, I can actually have a successful build run with MSBuild locally,
Actual behavior
An error that claims this isn't recognized.
Environment data
msbuild /version output:
16.4.0.56107 current version
OS info:
If applicable, version of the tool that invokes MSBuild (Visual Studio, dotnet CLI, etc): MSBuild.
Checking down the line, I tried "Specify location" instead of using the "Version" selection, and then proceeded to use the MSBuild.Exe (installed from the Build Tools 2019) from the target machine where the self-hosted agent was. From there, I was no longer having claims that "version" was no longer recognized.
While I solved my problem, I think it means that the MSBuild : latest option may need to be investigated.