I'm using build.ps1 with --target vs2022 and get the error:
Starting to build targeting toolchain v143
Targeting v143 using configuration Release on platform (System.Collections.Hashtable.ArchLong)
VSWhere path C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe
2019InstallPath:
Caught an exception: Visual Studio 2019 was not found
Exception Type: Microsoft.PowerShell.Commands.WriteErrorException
Stack Trace: at Die, C:\Users\Jenkins\AppData\Local\Jenkins\.jenkins\workspace\cefsharp\cef-binary\cef-binary-master\build.ps1: line 99
at Msvs, C:\Users\Jenkins\AppData\Local\Jenkins\.jenkins\workspace\cefsharp\cef-binary\cef-binary-master\build.ps1: line 254
at VSX, C:\Users\Jenkins\AppData\Local\Jenkins\.jenkins\workspace\cefsharp\cef-binary\cef-binary-master\build.ps1: line 380
at <ScriptBlock>, C:\Users\Jenkins\AppData\Local\Jenkins\.jenkins\workspace\cefsharp\cef-binary\cef-binary-master\build.ps1: line 746
at <ScriptBlock>, C:\Users\Jenkins\AppData\Local\Jenkins\.jenkins\workspace\cefsharp\cef-binary\cef-binary-master@tmp\durable-c2e5ba2c\powershellScript.ps1: line 3
at <ScriptBlock>, <No file>: line 1
at <ScriptBlock>, <No file>: line 1
powershell.exe : Die : Visual Studio 2019 was not found
I'm using build.ps1 with --target vs2022 and get the error:
This seems to be related to https://github.com/cefsharp/cef-binary/blob/0dd29533e4b65ef38b5707afd610ace53cab4feb/build.ps1#L239 but I don't understand the variable $ ($PSItem) in that situation. When replacing $ with $Toolchain it works as expected.