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?
It's basically saying that if you want to develop your Flutter application 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 the C++ tool after installing Visual Studio and then navigating to tool → Get tools and features → Desktop development with C++.
The error means install Visual Studio, and this is different from Visual Studio Code. It's an IDE from Microsoft.
For those who 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:
MSVC v142 - Visual Studio 2022 C++ x64/86 build tools.
Windows 10 SDK (for Windows 10 users)
C++ CMake tools for Windows.
In total, they should occupy around 8 GB or so.
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++:
This will not prevent you from developing Mobile apps, but it's a requirement only for Windows Development.
Is unnecessary to install the "Desktop development with C++" if you don't want to develop desktop applications for Windows using Flutter.
If you only want to develop mobile apps using Flutter, you can run
flutter config --no-enable-windows-desktop
to disable the desktop support for your Flutter projects. After that, when you run the flutter doctor command again, you will no longer see the warning.
Read more at: https://fig.io/manual/flutter/config
Only two steps are required.
Install Visual Studio 2022 (Link: https://visualstudio.microsoft.com/downloads/)
Install Visual Studio Code (Link: https://code.visualstudio.com/)
Your code will run smoothly.
My solution was a bit simpler. Uninstall everything all build system's from VS. Then reinstall Visual Studio Community 2022, restart then try again. Might get a warning about nuget but it should fix the issue.
With the newest android installer "android-studio-2022.1.1.19-windows" there would be a jbr and jre folder existing, hence creating a link from jre to jbr would not work.
What you can do is copy the contents of the items in jbr into the jre folder and this would resolve the error.
Make sure to install Visual Studio Code.
Open the Visual Studio download page:
I'm becoming crazy...
I tried three times to reinstall Monterey and Visual Studio 2022 Enterprise for Mac.
Fresh install of Monterey last version at today on mac intel (12.4).
Install of visual studio 2022 enterprise for mac last version at today (17.0.1 build 72).
Android SDK Manager does not work.
How to reproduce the problem:
Open Android sdk manager (Tools > Android Sdk Manager).
Click on Android 9.0 - Pie check box to install Android SDK Platform28 (as an example)
Click on "Apply Changes" pushbutton.
"Apply Changes" becomes disabled for a moment but nothing happens.
"Apply Changes" becomes enabled, click on it another time.
Android 9.0 - Pie check box becomes unchecked and nothing happens,
sometimes a crash is recorded to be sent to Microsoft.
Android SDK Location and Java SDK Location are ok.
I cannot use "Report a Problem because it does not work.
I can open "Report a Problem" but if i click on "Report a New Problem" button nothing happens and sometimes Visual Studio crashes.
Please, help me.
I have the same problem. I worked around it, by using the SDK Command Prompt in Visual Studio 2022 (Tools->SDK Command Prompt). I have version 17.0.2 (build 8) Community Version.
Once in the terminal, change into cmdline-tools/[version]/bin.
You can then list available packages:
./sdkmanager --list
You can install various packages:
./sdkmanager --install "system-images;android-26;default;x86"
./sdkmanager --install "platforms;android-26"
Restart Visual Studio to see the changes applied. I was then able to create a device for testing.
I want to run flutter app on windows 10, I installed Visual Studio and Android Studio, The app is working fine on mobile, but when it's running on Windows platform I faced this problem:
CMake Error at CMakeLists.txt:2 (project):
Generator
Visual Studio 16 2019
could not find any instance of Visual Studio.
Flutter doctor has not any problem:
My Visual Studio version is 2022 which downloaded from
https://visualstudio.microsoft.com/downloads
CMake had installed and added into Path env.
How Can I solve this problem?
Thank you
You need to instal Visual Studio 2019, because Visual Studio 2022 is/was not supported.
I'm trying to port my Unity 2019.1 created Steam and mobile game to Xbox One and UWP. I can create a VS project and build and deploy to console. Running "Build and Run" from Unity 2019.1 throws up this error:
D:_Programming Stuff\Unity\output_Data\ionAXXIA_UWP\Il2CppOutputProject\Il2CppOutputProject.vcxproj : warning : The build tools for Visual Studio 2017 (v141) cannot be found. Install Visual Studio 2017 (v141) to build using the Visual Studio 2017 (v141) build tools.
Is it possible to Build and Run from Unity to Xbox console, and if so, what do I need to do to fix this error?
Dunno why I was downvoted. Turns out it was a bug fixed in 2020.1.0a4, 2018.4.10f1, 2019.2.6f1, 2019.3.0b4. So 2019.2 and 2019.3 were fixed but 2019.1 wasn't. A project migration to 2019.2 fixed the issue and didn't cause any other problems with my project.
https://issuetracker.unity3d.com/issues/uwp-building-project-for-visual-studio-2019-generates-solution-that-targets-build-tools-for-vs-2017-tool-set-v141?_ga=2.235968517.563689385.1582629936-2037394333.1563991472
I'm trying to build Unity application for Hololens device on Visual Studio 2017 and I'm getting the following errors:
Metadata file '...\GeneratedProjects\UWP\Assembly-CSharp-firstpass\bin\x86\Release\Assembly-CSharp-firstpass.dll' could not be found
Metadata file '...\GeneratedProjects\UWP\Assembly-CSharp\bin\x86\Release\Assembly-CSharp.dll'
I'm aware of the similar question here but uninstalling and installing the latest versions of both Unity and VS did not help. Neither did starting a completely new project. I'm using now the latest versions of Unity (2017.1.0f3) and Visual Studio 2017 (15.3.0).
I've tried uninstalling both applications. Everything was working fine yesterday but then I downloaded additional components to Visual Studio (ASP.NET) and the Hololens build stopped working. Any idea how I could fix the issue?
I can see the Assembly-CSharp-firstpass.dll in Unprocessed folder under the path it's searching for it and even tried to copy it to the correct path but it did not help. I have also tried to build the project without ticking the Unity C# Projects but I get a different error then.
Update
I found this post on Unity forums and I think it's the same issue I have: https://forum.unity3d.com/threads/net-scripting-backend-and-visual-studio-2017-3-incompatibility.487833/
A workaround for this issue is to manually modifiying The "UAP,Version=v10.0.xxx" to "UAP,Version=v10.0" In the project.lock.json files of the GeneratedProjects.
Other solutions to this problem include a downgrade to Visual Studio 2015, or using the patch that the link you provided has.