Closed pianomanjh closed 5 years ago
Per the description of Select-VSSetupInstance
,
You can specify zero or more products (by default, Visual Studio Community, Professional, and Enterprise are selected)... This is by design, and congruent with vswhere. Both were designed to find instances of the Visual Studio ID. If you want to find other products the installer installs, you can pass
-Product *
.
For build agents, typically one will install just build tools, and not full Visual Studio.
In my situation, I have VS2017 (full) and VS2019 build tools installed on the agent,
Get-VSSetupInstance
nicely returns:However, if I pipe that to
Select-VSSetupInstance -Latest
, I only get back the VS2017 instance, which is not the latest.It seems the
Select-VSSetupInstance
function only returns retail install instances?Thanks