Skip to content

Conversation

@andysterland
Copy link
Member

@andysterland andysterland commented Oct 31, 2025

Context

Adding VS2026 to the VSBuild@1 task so it can be used as soon the GA release of VS2026 becomes available.

Important This task uses VSWhere to determine what versions of Visual Studio are installed. VSWhere won't find VS2026 Insiders without the -prerelease flag. This will cause issues wherever it's assumed -latest will return 18.0. Ergo it might be best to not update this task until VS2026 is GA as plumping through -prerelease is a much bigger change.

#21319

 vswhere -latest -prerelease

Task Name

VSBuildV1

Description

Adding Visual Studio 2026, 18.0, to the hardcoded list of versions that are available.

Risk Assessment (Low / Medium / High)

Low


Change Behind Feature Flag (Yes / No)

No.


Tech Design / Approach

Copy of the commit 1ab60be and 41450699102924f215268bff661191afe9fe6c3d5703d3a7473db7e4293a2950 that added VS2022 but with +1 on versions :).


Documentation Changes Required (Yes/No)

Yes. Documentation needs to be updated to include 18.0 as a valid version.


Unit Tests Added or Updated (Yes / No)

No


Additional Testing Performed


Logging Added/Updated (Yes/No)

No, no change required updated logging.

Telemetry Added/Updated (Yes/No)

No. The task has no telemetry.


Rollback Scenario and Process (Yes/No)


Dependency Impact Assessed and Regression Tested (Yes/No)

  • All impacted internal modules, APIs, services, and third-party libraries are analyzed.
  • Results are reviewed and confirmed to not break existing functionality.

Checklist

  • Related issue linked (if applicable)
  • Task version was bumped — see versioning guide
  • [] Verified the task behaves as expected

@ToreDemant
Copy link

ToreDemant commented Oct 31, 2025

Would it make sense to also include the same changes for VSBuild, VSTest and other tasks that have hardcoded Visual Studio versions?

For reference, similar changes when VS2022 was released:
#15179
#15400

@timheuer
Copy link
Member

Thanks @andysterland for getting this started -- change looks good to me. As we discussed in chat I think this is overly engineering with specific string-looking rather than really relying on vswhere itself which already has version and latest and prerelease supported. But for the sake of ensuring this maps to release forVS2026, I'd take this change quickly and log a different issue to refactor so that each release/dot-release we don't have to chase down all these tasks. Also +1 to @ToreDemant as it indeed looks like all the others need same update.

@jessehouwing
Copy link
Contributor

jessehouwing commented Nov 3, 2025

This SqlAzureDacpacDeploymentV1 Task also looks up the presence of VS:

Invoke-VstsTool -FileName "$PSScriptRoot\vswhere.exe" -Arguments "-version [15.0,18.0) -latest -format json" -RequireExitCodeZero 2>&1 |

@jessehouwing
Copy link
Contributor

jessehouwing commented Nov 3, 2025

@ToreDemant
Copy link

ToreDemant commented Nov 3, 2025

Similar to the comment from @jessehouwing , then I believe that also VSTestv2 needs to be fixed for us that are on Azure DevOps Server 2022.2 if the documentation is correct that V3 is not supported on-prem:
https://learn.microsoft.com/en-us/azure/devops/pipelines/tasks/reference/vstest-v3?view=azure-pipelines&viewFallbackFrom=azure-pipelines-2022.2

@andysterland
Copy link
Member Author

And I suspect it should target the msbuildv1 as well:

https://github.com/microsoft/azure-pipelines-tasks/blob/master/Tasks/MSBuildV1/task.json#L57-L65

Which requires updating: https://github.com/microsoft/azure-pipelines-tasks-common-packages/blob/626b27c67dcbc98a222c3ed13d47903107e8f44a/common-npm-packages/msbuildhelpers/PathFunctions.ps1#L370

Thanks for pointing that out :).

Looking into that file a bit more. It looks like making a change across the board in that file is probably best once VS2026 is released as it looks like that file checks for latest and I'd be worried about the impact as the -prerelease flag isn't used and adding it would add a fair bit of complexity.

@andysterland
Copy link
Member Author

Similar to the comment from @jessehouwing , then I believe that also VSTestv2 needs to be fixed for us that are on Azure DevOps Server 2022.2 if the documentation is correct that V3 is not supported on-prem: https://learn.microsoft.com/en-us/azure/devops/pipelines/tasks/reference/vstest-v3?view=azure-pipelines&viewFallbackFrom=azure-pipelines-2022.2

Added.

@andysterland
Copy link
Member Author

@timheuer @ToreDemant @jessehouwing Thanks for looking at this PR :). I was thinking of holding off merging until VS2026 releases. vswhere won't, by default, find the current VS2026/Dev18 installs as they are prerelease. I worry that might cause buggy interactions with assumptions around either 18 or 17 being latest.

@ToreDemant
Copy link

@andysterland These tasks have never supported prerelease/insider release som maybe it is not the biggest problem if they don't after this change either. Perhaps changing the title and description to mention 'Visual Studio 18.0 GA'

I do however agree that it would be preferrable if that support could be added too, in another PR of cause. Perhaps it could be done like the environment knob in Azure Pipeline Agent called ENABLE_VS_PRERELEASE_VERSIONS:
https://github.com/search?q=repo%3Amicrosoft%2Fazure-pipelines-agent+prerelease&type=code

@ToreDemant
Copy link

ToreDemant commented Nov 3, 2025

It seems that the node module azure-pipelines-tasks-msbuildhelpers also has a few lists of Visual Studio versions that is used if calling MSBuildV1 (and possibly others) asking for 'Latest'.

Any idea on how/where that can be updated?

@andysterland
Copy link
Member Author

andysterland commented Nov 4, 2025

It seems that the node module azure-pipelines-tasks-msbuildhelpers also has a few lists of Visual Studio versions that is used if calling MSBuildV1 (and possibly others) asking for 'Latest'.

Any idea on how/where that can be updated?

I think @jessehouwing pointed out they come from: https://github.com/microsoft/azure-pipelines-tasks-common-packages/tree/main/common-npm-packages/msbuildhelpers

Started a draft PR for that at: microsoft/azure-pipelines-tasks-common-packages#506

@ToreDemant
Copy link

Arh, of cause, @jessehouwing is as always one step ahead :-)

@ToreDemant
Copy link

ToreDemant commented Nov 4, 2025

@andysterland there seem to still be picklists missing from this PR.

These are the ones I found:

I found these places by searching for '17' and '2022' as I figured that if they are there then there probably also need to be something for '18' or '2026'.

@jessehouwing
Copy link
Contributor

jessehouwing commented Nov 4, 2025

Arh, of cause, @jessehouwing is as always one step ahead :-)

I'll take that as a compliment. I'll make sure the task is available for Azure DevOps Server

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants