Skip to content

Conversation

@protikbiswas100
Copy link
Contributor

@protikbiswas100 protikbiswas100 commented Dec 2, 2025

Description

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Automation (AI changes or Github Actions to reduce effort of manual tasks)

Why

Users with only VS2026 installed cannot run npx @react-native-community/cli run-windows because 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

  • CLI VS detection fix: Updated vsInstalls.ts to 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 detected
  • Updated healthCheckList.ts: Display text now shows "Visual Studio 2022/2026" instead of just "Visual Studio 2022"
  • New agent image config: Created .ado/image/rnw-img-vs2026-node22.json with VS bootstrapper URL https://aka.ms/vs/18/release/vs_Enterprise.exe (configuration template for infrastructure team to build and deploy)
  • Updated all CI pipelines to use rnw-img-vs2026-node22:
    • windows-vs-pr.yml, windows-vs-pr-secure.yml, continuous.yml, compliance.yml, publish.yml
  • Updated integrate-rn.yaml: Changed vmImage from windows-2022 to windows-2025 (latest available Azure DevOps hosted image - windows-2026 does not exist)
  • Updated msbuild-sln.yml:
    • msbuildVersion: 17.018.0
    • platformToolset: v143v145
  • Updated discover-google-test-adapter.yml: VS path updated to use Microsoft Visual Studio\18\Enterprise (VS2026 installs to version-numbered folder 18, not 2026)
  • Updated vnext/Scripts/rnw-dependencies.ps1:
    • Changed ValidateSet tag from 'vs2022' to 'vs2026'
    • Updated minimum VS version from 17.11.0 to 18.0.0
    • Updated WinGet package references from Microsoft.VisualStudio.2022.* to Microsoft.VisualStudio.2026.*
    • Updated display name from "Visual Studio 2022" to "Visual Studio 2026"
  • Updated VS project files (following VS2019→VS2022 upgrade pattern from commit 5885ee4):
    • AutomationChannel.sln - VisualStudioVersion from 17.x to 18.x
    • AutomationChannel.vcxproj - MinimumVisualStudioVersion from 17.0 to 18.0
    • UsesPackageReference.csproj - MinimumVisualStudioVersion from 17.0 to 18.0
    • UsesPackagesConfig.vcxproj - MinimumVisualStudioVersion from 17.0 to 18.0
  • Added change files for versioning (react-native-windows, @react-native-windows/cli, @react-native-windows/automation-channel, and @react-native-windows/telemetry packages)

Note: The CI pipeline changes require the infrastructure team to build and deploy the rnw-img-vs2026-node22 image 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

vs-build-success

Testing

The CLI fix allows users with VS2026 to successfully run npx @react-native-community/cli run-windows for local development. CI pipeline changes will be validated once the infrastructure team builds and deploys the rnw-img-vs2026-node22 agent 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

This section details on the original issue you should resolve

<issue_title>Missing Visual Studio 2026 support</issue_title>
<issue_description>### Problem Description

Having Visual Studio 2026 installed but not VS2022, the command npx @react-native-community/cli run-windows --logging won't work, reporting missing MSBuild.

I'm opening this as a bug, as VS2022 installation is inherently complicated/buggy, at least if you have VS2026 already.

Steps To Reproduce

In a fresh project created with npx --yes @react-native-community/cli@latest init <projectName> --version "^0.80.0", and without VS2022, execute:

> npx @react-native-community/cli run-windows --logging

 i Running x64 node on a x64 machine
 i Verbose: ON
Looking for VS installs with version range: [17.11.0,18.0)
Looking for vswhere at: C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe
 ‼ No public VS release found
 i Trying pre-release VS
Looking for VS installs with version range: [17.11.0,18.0]
Looking for vswhere at: C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe
 × Could not find MSBuild with VCTools for Visual Studio 17.11.0 or later. Make sure all required components have been installed
Command failed with error NoMSBuild: Could not find MSBuild with VCTools for Visual Studio 17.11.0 or later. Make sure all required components have been installed

Expected Results

It should work, as it's the newest release of VS2026. Also, installing VS2022 is difficult if you have VS2026 installed.

Temporary solution

Manually changing the value '17.11.0' with '18.0.0' in /node_modules/@react-native-windows/cli/lib-commonjs/utils/msbuildtools.js solved the problem for me (for anybody interested).
Obviously this isn't a solution, as proper support should be added, but a escape hatch

CLI version

20.0.0

Environment

info Fetching system and libraries information...
System:
  OS: Windows 11 10.0.26200
  CPU: "(24) x64 AMD Ryzen 9 7900X 12-Core Processor            "
  Memory: 28.26 GB / 63.14 GB
Binaries:
  Node:
    version: 24.11.1
    path: C:\Program Files\nodejs\node.EXE
  Yarn: Not Found
  npm:
    version: 11.6.3
    path: C:\Program Files\nodejs\npm.CMD
  Watchman: Not Found
SDKs:
  Android SDK: Not Found
  Windows SDK:
    AllowDevelopmentWithoutDevLicense: Enabled
    Versions:
      - 10.0.22621.0
      - 10.0.26100.0
IDEs:
  Android Studio: Not Found
  Visual Studio:
    - 18.0.11217.181 (Visual Studio Community 2026)
Languages:
  Java:
    version: 22.0.2
    path: C:\Program Files\OpenJDK\jdk-22.0.2\bin\javac.EXE
  Ruby: Not Found
npmPackages:
  "@react-native-community/cli":
    installed: 20.0.0
    wanted: 20.0.0
  react:
    installed: 19.1.1
    wanted: 19.1.1
  react-native:
    installed: 0.80.1
    wanted: 0.80.1
  react-native-windows:
    installed: 0.80.0
    wanted: ^0.80.0
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: true
iOS:
  hermesEnabled: Not found
  newArchEnabled: Not found

info React Native v0.82.1 is now available (your project is running on v0.80.1).
info Changelog: https://github.com/facebook/react-native/releases/tag/v0.82.1
info Diff: https://react-native-community.github.io/upgrade-helper/?from=0.80.1&to=0.82.1
info For more info, check out "https://reactnative.dev/docs/upgrading?os=windows".

Community Modules

No response

Target React Native Architecture

New Architecture (WinAppSDK) Only

Target Platform Version

None

Visual Studio Version

None

Build Configuration

None

Snack, code example, screenshot, or link to a repository

None</issue_description>

<agent_instructions>Update Visual Studio to 2026 in CI pipeline builds</agent_instructions>

Comments on the Issue (you are @copilot in this section)


✨ 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

@protikbiswas100 protikbiswas100 requested review from a team as code owners December 2, 2025 04:37
@protikbiswas100 protikbiswas100 changed the title Cherrypick vs2026 Add Visual Studio 2026 support in CI pipelines and CLI Dec 2, 2025
@microsoft microsoft deleted a comment from azure-pipelines bot Dec 2, 2025
@microsoft microsoft deleted a comment from azure-pipelines bot Dec 2, 2025
@microsoft microsoft deleted a comment from azure-pipelines bot Dec 2, 2025
@microsoft microsoft deleted a comment from azure-pipelines bot Dec 2, 2025
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.

Missing Visual Studio 2026 support

1 participant