microsoft / vssetup.powershell

PowerShell module to interact with Visual Studio Setup
MIT License
233 stars 41 forks source link

VS Preview not detected #60

Closed metablaster closed 4 years ago

metablaster commented 4 years ago

I installed VS 2019 Preview, and noticed it's not detected as an instance while running: Get-VSSetupInstance

Is there some option I'm missing or it just doesn't work with preview instances?

metablaster commented 4 years ago

Ah, silly me, sorry for disturbing!

Get-VSSetupInstance -Prerelease

puxu-msft commented 3 years ago

Same issue, but I tried -All which didn't include -Prerelease, it's maybe a bug.

heaths commented 3 years ago

When in doubt, run help get-vssetupinstance:

    -All [<SwitchParameter>]
        Enumerate all instances of Visual Studio - even those with fatal errors.

        Required?                    false
        Position?                    named
        Default value                False
        Accept pipeline input?       False
        Accept wildcard characters?  false

    -Prerelease [<SwitchParameter>]
        Also show prereleases / previews. By default, only releases are shown.

        Required?                    false
        Position?                    named
        Default value                False
        Accept pipeline input?       False
        Accept wildcard characters?  false

These parameters match what is in vswhere as well. By default, only launchable instances are enumerate because others are not technically in a usable state and may fail for whatever purpose you need them. -Prerelease is separate because they may be launchable or not, but are also prereleases and not always fully supported for production workloads. That's why they are separate switches: they are for different purposes.