The following script might be run on a non-Windows environment and likely fails with a cryptic message.
https://github.com/51Degrees/common-ci/blob/main/environments/setup-msbuild.ps1
Consider checking that the environment can support msbuild and stopping with a clear warning if not.