Skip to content

Commit

Permalink
Use latest version of VS BuildTools
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
inknos committed Dec 9, 2024
1 parent 8ff491b commit 2c58af0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion contrib/win-installer/build-hooks.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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`". "
Expand Down

0 comments on commit 2c58af0

Please sign in to comment.