-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Add Visual Studio 2026 support in CI pipelines and CLI #15415
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: protikbiswas100 <[email protected]>
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
| "parameters": { | ||
| "Workloads": "--add Microsoft.VisualStudio.Workload.ManagedDesktop --add Microsoft.VisualStudio.Workload.NativeDesktop --add Microsoft.VisualStudio.Workload.Universal --add Microsoft.Component.MSBuild --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 --add Microsoft.VisualStudio.ComponentGroup.UWP.Support --add Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Core --add Microsoft.VisualStudio.Component.Windows10SDK.19041 Microsoft.VisualStudio.Component.Windows11SDK.22621 --add Microsoft.VisualStudio.ComponentGroup.UWP.VC --includeRecommended --includeOptional", | ||
| "SKU": "Enterprise", | ||
| "VSBootstrapperURL": "https://aka.ms/vs/18/release/vs_Enterprise.exe" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this the correct URL for getting the VS exe file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, https://aka.ms/vs/18/release/vs_Enterprise.exe follows the standard VS bootstrapper URL format where the version number (18) corresponds to VS2026. This is consistent with previous versions like VS2022 using aka.ms/vs/17/release/.
|
|
||
| pool: | ||
| vmImage: windows-2022 | ||
| vmImage: windows-2025 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is it windows-2025 instead of 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
windows-2026 vmImage doesn't exist in Azure DevOps hosted agents. The latest available image is windows-2025 (Windows Server 2025). The VS version is separate from the Windows OS version - we're installing VS2026 on a Windows 2025 server via the custom agent image configuration.
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
protikbiswas100
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You alkso need to update to vs-2026 from vs-2022 in vnext/Scripts/rnw-dependencies.ps1
Co-authored-by: protikbiswas100 <[email protected]>
Updated in 47208e2. Changed VS version references from 2022 to 2026, including:
|
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
protikbiswas100
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add chnage file
Co-authored-by: protikbiswas100 <[email protected]>
I followed and referenced this 3 years old commit from Jon and updated some of the files 5885ee4#diff-c22885d97fa21ad974a3f5f982d92b6f45edc251fd34bc14223492ebd7391245 |
iamAbhi-916
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/microsoft/react-native-windows/blob/main/.ado/image/rnw-img-vs2022-node22.json#L3
We need to update the VM image to 2025 and then we need to update codegen and versions here.
…adapter.yml Co-authored-by: protikbiswas100 <[email protected]>
Instead of updating rnw-img-vs2022-node22.json I created a new image definition here called rnw-img-vs2026-node22.json, and what do you mean by updating codegen here? |
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
|
added change in a new PR #15426 |
Description
Type of Change
Why
Users with only VS2026 installed cannot run
npx @react-native-community/cli run-windowsbecause the CLI and CI pipelines are hardcoded for VS2022 (version 17.x). VS2026 uses version 18.x with platform toolset v145. The CLI was searching for VS with version range[17.11.0,18.0)which excludes VS2026.Resolves #15387
What
vsInstalls.tsto extend the version range from[17.11.0,18.0)to[17.11.0,19.0)when minVersion is 17.x, allowing both VS2022 (17.x) and VS2026 (18.x) to be detectedhealthCheckList.ts: Display text now shows "Visual Studio 2022/2026" instead of just "Visual Studio 2022".ado/image/rnw-img-vs2026-node22.jsonwith VS bootstrapper URLhttps://aka.ms/vs/18/release/vs_Enterprise.exe(configuration template for infrastructure team to build and deploy)rnw-img-vs2026-node22:windows-vs-pr.yml,windows-vs-pr-secure.yml,continuous.yml,compliance.yml,publish.ymlintegrate-rn.yaml: Changed vmImage fromwindows-2022towindows-2025(latest available Azure DevOps hosted image -windows-2026does not exist)msbuild-sln.yml:msbuildVersion: 17.0→18.0platformToolset: v143→v145discover-google-test-adapter.yml: VS path updated to useMicrosoft Visual Studio\18\Enterprise(VS2026 installs to version-numbered folder18, not2026)vnext/Scripts/rnw-dependencies.ps1:17.11.0to18.0.0Microsoft.VisualStudio.2022.*toMicrosoft.VisualStudio.2026.*AutomationChannel.sln- VisualStudioVersion from 17.x to 18.xAutomationChannel.vcxproj- MinimumVisualStudioVersion from 17.0 to 18.0UsesPackageReference.csproj- MinimumVisualStudioVersion from 17.0 to 18.0UsesPackagesConfig.vcxproj- MinimumVisualStudioVersion from 17.0 to 18.0react-native-windows,@react-native-windows/cli,@react-native-windows/automation-channel, and@react-native-windows/telemetrypackages)Note: The CI pipeline changes require the infrastructure team to build and deploy the
rnw-img-vs2026-node22image to the Azure DevOps agent pools before CI will work with VS2026. The CLI changes for local development with VS2026 are immediately functional.This change follows the same pattern as the VS2019 to VS2022 upgrade in commit 5885ee4.
Screenshots
N/A - CI configuration and CLI detection changes only.
Testing
The CLI fix allows users with VS2026 to successfully run
npx @react-native-community/cli run-windowsfor local development. CI pipeline changes will be validated once the infrastructure team builds and deploys thernw-img-vs2026-node22agent image to the Azure DevOps pools.Changelog
Should this change be included in the release notes: yes
Added Visual Studio 2026 support. The CLI now detects both VS2022 (17.x) and VS2026 (18.x). CI pipelines and project files updated to require VS2026 with platform toolset v145 (requires infrastructure team to deploy the new agent image).
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.
Microsoft Reviewers: Open in CodeFlow