build.ps1: fix build with GithubActionsCI (#950)

This error was happening when trying to build XamarinEssentials
under a GithubActions VM:

```
Run .\build.ps1
Using MSBuild from: C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\15.0\Bin\MSBuild.exe
& : The term 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\15.0\Bin\MSBuild.exe' is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At D:\a\DotNetEssentials\DotNetEssentials\build.ps1:27 char:3
+ & $msbuild "./Xamarin.Essentials.sln" /restore /t:Build /p:Configurat ...
+   ~~~~~~~~
+ CategoryInfo          : ObjectNotFound: (C:\Program Files (x\u20265.0\Bin\MSBuild.exe:String) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : CommandNotFoundException
```
This commit is contained in:
Andres G. Aragoneses 2019-10-29 08:46:05 +08:00 коммит произвёл Jonathan Dick
Родитель 807bede67a
Коммит 88b96b3883
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -13,7 +13,7 @@ if ($IsMacOS) {
} else {
$vswhere = 'C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe'
$msbuild = & $vswhere -latest -products * -requires Microsoft.Component.MSBuild -property installationPath
$msbuild = join-path $msbuild 'MSBuild\15.0\Bin\MSBuild.exe'
$msbuild = join-path $msbuild 'MSBuild\Current\Bin\MSBuild.exe'
$cibuild = "true"
}