Skip to content
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

Visual Studio is missing necessary components. #44184

Closed
csells opened this issue Nov 5, 2019 · 10 comments
Closed

Visual Studio is missing necessary components. #44184

csells opened this issue Nov 5, 2019 · 10 comments
Labels
a: build Building flutter applications with the tool a: desktop Running on desktop platform-windows Building on or for Windows specifically t: flutter doctor Problem related to the "flutter doctor" tool tool Affects the "flutter" command-line tool. See also t: labels.

Comments

@csells
Copy link
Contributor

csells commented Nov 5, 2019

Steps to Reproduce

  1. Install Flutter on a new Windows machine
  2. Switch to master channel and upgrade to latest version
  3. Install Visual Studio 2019 Community Edition, choosing the "Desktop development with C++" workload
  4. Start a new cmd session in case any environment variables have been changed
  5. Run flutter doctor and get the following Visual Studio-related error message:

image

  1. Double-check Visual Studio Installer settings, which seem correct:

image

  1. Log this bug

Logs

[√] Flutter (Channel master, v1.10.15-pre.405, on Microsoft Windows [Version 10.0.18362.418], locale en-US)
    • Flutter version 1.10.15-pre.405 at c:\Users\csell\flutter
    • Framework revision 28b5cc3825 (4 hours ago), 2019-11-05 11:50:30 +0100
    • Engine revision 7b968ff95f
    • Dart version 2.7.0

[√] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    • Android SDK at C:\Users\csell\AppData\Local\Android\sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-29, build-tools 29.0.2
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)
    • All Android licenses accepted.

[!] Visual Studio - develop for Windows (Visual Studio Community 2019 16.3.7)
    • Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community
    • Visual Studio Community 2019 version 16.3.29424.173
    X Visual Studio is missing necessary components. Please re-run the Visual Studio installer for the "Desktop development with C++" workload, and include these components:
        MSBuild
        MSVC v142 - VS 2019 C++ x64/x86 build tools
       - If there are multiple versions, install the latest one
        Windows 10 SDK (10.0.17763.0)

[!] Android Studio (version 3.5)
    • Android Studio at C:\Program Files\Android\Android Studio
    X Flutter plugin not installed; this adds Flutter specific functionality.
    X Dart plugin not installed; this adds Dart specific functionality.
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)

[√] VS Code (version 1.39.2)
    • VS Code at C:\Users\csell\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.5.1

[√] Connected device (1 available)
    • Windows • Windows • windows-x64 • Microsoft Windows [Version 10.0.18362.418]

! Doctor found issues in 2 categories.
@csells
Copy link
Contributor Author

csells commented Nov 5, 2019

Running the x64 Native Tools Command Prompt for VS 2019 cmd prompt makes the various MSVC tools available on the command line, e.g. msbuild, but does not appease flutter doctor.

@iapicca iapicca added d: devtools DevTools related - suite of performance and debugging tools tool Affects the "flutter" command-line tool. See also t: labels. labels Nov 5, 2019
@stuartmorgan
Copy link
Contributor

Your screenshot shows the required SDK version as unselected, so you are missing one of the required components listed by doctor

@stuartmorgan stuartmorgan added a: build Building flutter applications with the tool a: desktop Running on desktop platform-windows Building on or for Windows specifically and removed d: devtools DevTools related - suite of performance and debugging tools labels Nov 5, 2019
@stuartmorgan
Copy link
Contributor

Apparently in VS 2019 it's now possible to just set the version to "10.0" instead of an exact version, which wasn't possible when I was initially researching this. We may want to require 2019 so that we can switch to that, since this has been, and will continue to be, a pain point.

@csells
Copy link
Contributor Author

csells commented Nov 5, 2019

how do I fix the issue?

@stuartmorgan
Copy link
Contributor

You need to install the component called "Windows 10 SDK (10.0.17763.0)"

@stuartmorgan
Copy link
Contributor

Unfortunately there doesn't appear to be a generic component ID for "latest SDK" so even if we set it to 10.0 and required VS 2019 doing the vswhere query would be very messy, and require tool updates for every Windows SDK release.

@csells
Copy link
Contributor Author

csells commented Nov 5, 2019

Then the bug is that flutter doctor says to do two things:

  1. Install the "latest" Windows SDK, which is "10.0.18362.0" right now.
  2. Install ""Windows 10 SDK (10.0.17763.0)".

#2 works. #1 does not.

@stuartmorgan
Copy link
Contributor

The line about installing the latest goes with the build tools, not the SDK. That's supposed to be clear from formatting but the indentation looks like it's messed up.

We should fix the indentation, and explicitly mention build tools again in that line so that confusion can't happen regardless of indentation.

@zanderso zanderso added the t: flutter doctor Problem related to the "flutter doctor" tool label Nov 5, 2019
@timsneath timsneath mentioned this issue Jan 3, 2020
13 tasks
@jmagman jmagman added this to Awaiting triage in Tools - doctor review Jan 10, 2020
@stuartmorgan
Copy link
Contributor

Closing since the text was improved to help avoid this confusion. #50487 tracks trying to eliminate the need for a specific SDK version entirely which would avoid this common problem.

Tools - doctor review automation moved this from Awaiting triage to Engineer reviewed Feb 25, 2020
@github-actions
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 22, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
a: build Building flutter applications with the tool a: desktop Running on desktop platform-windows Building on or for Windows specifically t: flutter doctor Problem related to the "flutter doctor" tool tool Affects the "flutter" command-line tool. See also t: labels.
Projects
Tools - doctor review
  
Engineer reviewed
Development

No branches or pull requests

4 participants