Skip to content

Upgrade to support VS2026 and VS2022 at the same time and server #34

Description

@ignazgebinde

Hi Team!

I am using the task in my DevOps Server for some time. I wanted to update my Build Server so I can use the new Visual Studio 2026 in parallel with Visual Studio 2022

But the current Version on marketplace (2.0.5) only supports $Version "15.0", "16.0" and "17.0" and "latest". So latest and "17.0" yield 2 version because the compare is

   if ($Version -eq "17.0" -and
            ($instance = Get-VSSetupInstance | Select-VSSetupInstance -Version '[17.0,)') -and
            $instance.installationPath) {
            return $instance.installationPath
        }

a more strict behavior in master/task/ps_modules/utils.psm1 like

    try {
        if ($Version -eq "18.0" -and
            ($instance = Get-VSSetupInstance | Select-VSSetupInstance -Version '[18.0,19.0)') -and
            $instance.installationPath) {
            return $instance.installationPath
        }
        if ($Version -eq "17.0" -and
            ($instance = Get-VSSetupInstance | Select-VSSetupInstance -Version '[17.0,18.0)') -and
            $instance.installationPath) {
            return $instance.installationPath
        }
        if ($Version -eq "16.0" -and
            ($instance = Get-VSSetupInstance | Select-VSSetupInstance -Version '[16.0,17.0)') -and
            $instance.installationPath) {
            return $instance.installationPath
        }
        # Search for a 15.0 Willow instance.
        if ($Version -eq "15.0" -and
            ($instance = Get-VSSetupInstance | Select-VSSetupInstance -Version '[15.0,16.0)') -and
            $instance.installationPath) {
            return $instance.installationPath
        }
    }

would help and support the latest VS2026 Version.

Furthermore please add a Tag in the commit for the next release so matching source code and Deployed Version in Marketplace would be much easy.

Thank you for your help and support.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions