From cb081f287e382e8e5e18a385f73c9b5eb43f4b52 Mon Sep 17 00:00:00 2001 From: Morten Daniel Fornes Date: Mon, 13 Apr 2020 02:56:59 +0700 Subject: [PATCH] build using Visual Studio 2019 when available This adds support for building Uno solutions using Visual Studio 2019. --- scripts/find-msbuild.ps1 | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/find-msbuild.ps1 b/scripts/find-msbuild.ps1 index 1aaf21621..689dde8f4 100644 --- a/scripts/find-msbuild.ps1 +++ b/scripts/find-msbuild.ps1 @@ -5,6 +5,12 @@ If (Get-Command "vswhere.exe" -ErrorAction SilentlyContinue) { vswhere.exe | Out-String -Stream | Select-String -SimpleMatch "installationPath:" | ForEach { $installationPath = $_ -Replace "^installationPath: ", "" + $msbuild = "$installationPath\MSBuild\Current\bin\msbuild.exe" + If (Test-Path $msbuild) + { + Write-Output $msbuild + exit 0 + } $msbuild = "$installationPath\MSBuild\15.0\bin\msbuild.exe" If (Test-Path $msbuild) { @@ -29,6 +35,7 @@ ElseIf (Test-Path $msbuild2) Write-Error -Message @" ERROR: Microsoft Build Tools 2015+ not installed (C# 6/.NET 4.5 support) +(not found) vswhere / Visual Studio 2019 (not found) vswhere / Visual Studio 2017 (not found) $msbuild1" (not found) $msbuild2"