Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to find suitable Visual Studio toolchain. Please run `flutter doctor` for more details

Iam trying to create and run a flutter desktop application in visual studio 2019 ,i have downloaded the files required(MSBuild and MSVC) and still getting error. i was having 2013 versio and uninstalled it and installed 2019 version and all is updated

this happen when i run flutter run command

Launching lib\main.dart on Windows in debug mode...
Unable to find suitable Visual Studio toolchain. Please run `flutter doctor` for more details.

and when i run flutter doctor gives me that error

[!] Visual Studio - develop for Windows (Visual Studio Community 2019 16.4.5)
    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 build tool versions available, install the latest
        Windows 10 SDK (10.0.17763.0)

Any solution !

like image 910
ADev Avatar asked Feb 21 '20 08:02

ADev


3 Answers

  1. Go to visual studio installer
  2. Click on modify
  3. Then click on individual component
  4. And select the exact version of Windows 10 SDK as shown in flutter doctor.

In my case, by default visual studio installer, installed Windows 10 SDK (10.0.18362.0) but Flutter required Windows 10 SDK (10.0.17763.0).

Just get the exact version of components as shown.

like image 91
Alok Kumar Avatar answered Nov 18 '22 23:11

Alok Kumar


If you are getting that error message, then according to Visual Studio you are missing at least one of the necessary components in that list. The most likely issue is that you didn't install the exact version of the Windows 10 SDK that's listed there, which is not included by default on the latest version.

(Edit: The exact SDK version requirement mentioned above was accurate at the time this answer was originally written, but does not apply to current versions of Flutter.)

like image 20
smorgan Avatar answered Nov 18 '22 23:11

smorgan


Install the Desktop Development with C++

Install the Desktop Development with

like image 11
Syed Umair Shah Bukhari Avatar answered Nov 18 '22 23:11

Syed Umair Shah Bukhari