Closed replaysMike closed 5 years ago
Works for me. Do you have a prerelease installed that also requires -prerelease
, or an incomplete instances that requires -all
?
This is an old thread but I'm having the same problem. I have VS Community installed and "-latest" returns nothing. When I use "-all" I get the following:
instanceId: acf1ba96 installDate: 12/20/2018 12:21:35 PM installationName: VisualStudio/15.9.4+28307.222 installationPath: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community installationVersion: 15.9.28307.222 productId: Microsoft.VisualStudio.Product.Community productPath: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\devenv.exe isPrerelease: 0 displayName: Visual Studio Community 2017 description: Free, fully-featured IDE for students, open-source and individual developers channelId: VisualStudio.15.Release channelUri: https://aka.ms/vs/15/release/channel enginePath: C:\Program Files (x86)\Microsoft Visual Studio\Installer\resources\app\ServiceHub\Services\Microsoft.VisualStudio.Setup.Service releaseNotes: https://go.microsoft.com/fwlink/?LinkId=660692#15.9.4 temporaryCache: C:\Users\ContainerAdministrator\AppData\Local\Temp\w1sq5m25 thirdPartyNotices: https://go.microsoft.com/fwlink/?LinkId=660708 updateDate: 2018-12-20T17:21:35.0118893Z catalog_buildBranch: d15.9 catalog_buildVersion: 15.9.28307.222 catalog_id: VisualStudio/15.9.4+28307.222 catalog_localBuild: build-lab catalog_manifestName: VisualStudio catalog_manifestType: installer catalog_productDisplayVersion: 15.9.4 catalog_productLine: Dev15 catalog_productLineVersion: 2017 catalog_productMilestone: RTW catalog_productMilestoneIsPreRelease: False catalog_productName: Visual Studio catalog_productPatchVersion: 4 catalog_productPreReleaseMilestoneSuffix: 1.0 catalog_productRelease: RTW catalog_productSemanticVersion: 15.9.4+28307.222 catalog_requiredEngineVersion: 1.18.1042.9589 properties_campaignId: properties_channelManifestId: VisualStudio.15.Release/15.9.4+28307.222 properties_nickname: properties_operationMode: 0 properties_setupEngineFilePath: C:\Program Files (x86)\Microsoft Visual Studio\Installer\vs_installershell.exe
Why can vswhere not find it otherwise?
Please see my previous question to the OP. -all
gets all instances - even those that are not complete (may require a reboot, or had some error). vswhere and the VSSetup module don't currently emit that information. By default, they only returns complete released products - not prereleases or incomplete products, unless -prerelease
or -all
(respectively) are specified.
Make sure that Get-VSSetupInstance
by itself even returns anything. If it returns any instance, Select-VSSetupInstance
works (it doesn't itself care about the state and does a simple aggregation over instances piped to it based purely on version and install date).
Without further information, closing as no-repro. This is a test scenario with both pre-release and incomplete instances (both one and multiple).
It would seem the -Latest argument should always return the latest instance found, but it doesn't return anything if there is only 1 instance to choose from. Multiple instances seems to work.