Visual Studio not installed; this is necessary for Windows development

Viewed 39695

Flutter doctor

My Flutter Doctor is saying: Visual Studio - develop for Windows X

Visual Studio not installed; this is necessary for Windows development. Download at https://visualstudio.microsoft.com/downloads/. Please install the "Desktop development with C++" workload, including all of its default components.

How can I fix this problem?

4 Answers

It's basically saying that if you want to develop your flutter app for windows you will need to install Visual Studio 2022 and while installing Visual Studio 2022 you will need to download this: Desktop development with C++

Also, you have to install the third link in this: Visual-studio

You could also get Desktop development with C++ tool after installing visual studio and then navigating to tool -> Get tools and features -> Desktop development with C++

enter image description here

As it states, you need to download Visual Studio (which is different from Visual Studio Code).

When installing it, remember to select the required package Desktop development with C++:

Screenshot

This will not prevent you from developing Mobile apps, but it's a requirement only for Windows Development.

The error means install Visual Studio, and this is different from Visual Studio Code. It's an IDE from Microsoft.

For those that may be using a weak computer and can't afford to install the full Visual Studio, You only need to install a few components from Visual studio to get flutter to run on your computer without errors. These components are:

  1. MSVC v142 - VS 2022 C++ x64/86 build tools.
  2. Windows 10 SDK (For windows 10 users)
  3. C++ CMake tools for Windows.

In total, they should occupy around 8GB or so.

Related