Skip to content

Conversation

@flutteractionsbot
Copy link

@flutteractionsbot flutteractionsbot commented Nov 13, 2025

This pull request is created by automatic cherry pick workflow
Please fill in the form below, and a flutter domain expert will evaluate this cherry pick request.

Issue Link:

What is the link to the issue this cherry-pick is addressing?

#176399

Changelog Description:

Explain this cherry pick in one line that is accessible to most Flutter developers. See best practices for examples

Visual Studio 2026 is not supported when compiling Windows desktop applications.

Impact Description:

What is the impact (ex. visual jank on Samsung phones, app crash, cannot ship an iOS app)? Does it impact development (ex. flutter doctor crashes when Android Studio is installed), or the shipping production app (the app crashes on launch)

Developers that only have Visual Studio 2026 installed are unable to compile Windows applications.

Workaround:

Is there a workaround for this issue?

Install an older version of Visual Studio.

Risk:

What is the risk level of this cherry-pick?

  • Low
  • Medium
  • High

Test Coverage:

Are you confident that your fix is well-tested by automated tests?

  • Yes
  • No

Validation Steps:

What are the steps to validate that this fix works?

  1. Install Visual Studio 2026 on a Windows installation without any other Visual Studio versions installed.
  2. Run flutter run -d windows to run a Windows desktop application.
  3. The application should successfully build and run.

Adds a mapping for Visual Studio 2026 to the `cmakeGenerator` property
used to drive Windows builds, enabling Flutter to be used for
development on a system with Visual Studio 2026 installed and not Visual
Studio 2022 or Visual Studio 2019.

Closes: flutter#176399
Related-To: flutter#93426

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.
@flutteractionsbot flutteractionsbot added the cp: review Cherry-picks in the review queue label Nov 13, 2025
@flutteractionsbot
Copy link
Author

@bkonyi please fill out the PR description above, afterwards the release team will review this request.

@flutter-dashboard
Copy link

This pull request was opened from and to a release candidate branch. This should only be done as part of the official Flutter release process. If you are attempting to make a regular contribution to the Flutter project, please close this PR and follow the instructions at Tree Hygiene for detailed instructions on contributing to Flutter.

Reviewers: Use caution before merging pull requests to release branches. Ensure the proper procedure has been followed.

@github-actions github-actions bot added tool Affects the "flutter" command-line tool. See also t: labels. a: desktop Running on desktop labels Nov 13, 2025
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds support for Visual Studio 2026 by updating the CMake generator logic and adding a corresponding test case. My review identifies a missing update for user-facing component descriptions in visual_studio.dart and suggests refactoring duplicated test logic in visual_studio_test.dart for better maintainability.

String? get cmakeGenerator {
// From https://cmake.org/cmake/help/v3.22/manual/cmake-generators.7.html#visual-studio-generators
return switch (_majorVersion) {
18 => 'Visual Studio 18 2026',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

While adding support for VS 2026 here is correct, a related part of the code seems to have been missed. The _requiredComponents method, which provides user-facing descriptions for necessary components, has not been updated for VS 2026 (or VS 2022). It will default to showing information for VS 2019's C++ build tools, which could be confusing for users with newer Visual Studio versions who are missing components.

As per the comment in _requiredComponents, the switch statement should be updated to include cases for versions 17 and 18 with the appropriate toolchain descriptions.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is nice to have for improved flutter doctor, but not strictly necessary. Since this is a stable cherry pick, let's skip.

@bkonyi bkonyi requested review from bkonyi and loic-sharma November 13, 2025 15:42
@reidbaker reidbaker added the autosubmit Merge PR when tree becomes green via auto submit App label Nov 17, 2025
@auto-submit auto-submit bot merged commit 444b8c3 into flutter:flutter-3.38-candidate.0 Nov 17, 2025
146 checks passed
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Nov 19, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Nov 19, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Nov 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a: desktop Running on desktop autosubmit Merge PR when tree becomes green via auto submit App cp: review Cherry-picks in the review queue tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants