From 2c58af0e6bab421fb1006002533d718a4b66e531 Mon Sep 17 00:00:00 2001 From: Nicola Sella Date: Mon, 9 Dec 2024 12:17:58 +0100 Subject: [PATCH] Use latest version of VS BuildTools When one or more versions of VS Build tools are installed the script .\winmake.ps1 installer does not finish with error. ... Done! Invoke-Expression: C:\...\podman\contrib\cirrus\win-lib.ps1:101:5 Line | 101 | Invoke-Expression $command -OutVariable unformattedLog | Write-Output | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | Cannot process argument transformation on parameter 'vsinstance'. Cannot convert the "System.Object[]" value of type "System.Object[]" to type | "Microsoft.VisualStudio.Setup.Instance". Signed-off-by: Nicola Sella --- contrib/win-installer/build-hooks.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/win-installer/build-hooks.ps1 b/contrib/win-installer/build-hooks.ps1 index 0d862c5e4a..2c9ad5b4c6 100644 --- a/contrib/win-installer/build-hooks.ps1 +++ b/contrib/win-installer/build-hooks.ps1 @@ -17,7 +17,7 @@ function Build-MSIHooks { if ( Get-MingW ) { Build-MSIHooks-Using-MingW $msiHooksFolder $artifactsFolder } elseif ( Get-VSBuildTools ) { - $vsinstance = Get-VSSetupInstance | Select-VSSetupInstance -Product Microsoft.VisualStudio.Product.BuildTools + $vsinstance = Get-VSSetupInstance | Select-VSSetupInstance -Product Microsoft.VisualStudio.Product.BuildTools -Latest Build-MSIHooks-Using-VSBuildTools $msiHooksFolder $artifactsFolder $vsinstance } else { $msg = "A C/C++ compiler is required to build `"$msiHooksFolder\check.c`". "