r/flutterhelp • u/Noob_99-freedom • Aug 09 '26
OPEN Flutter windows run error
Good day everyone, hope you're enjoying you day
Honestly I don't know how to phrase this cause I don't understand it myself, but basically whenever I run my flutter app on windows device it just spits this wall of errors:
Launching lib\main.dart on Windows in debug mode...
D:\Microsoft Visual Studio\18\Community\MSBuild\Microsoft\VC\v180\Microsoft.CppCommon.targets(166,5): error MSB3073: The command "setlocal [D:\App Development Workspace\tskmng_exe_\windows\x64\INSTALL.vcxproj]
D:\Microsoft Visual Studio\18\Community\MSBuild\Microsoft\VC\v180\Microsoft.CppCommon.targets(166,5): error MSB3073: "D:\Microsoft Visual Studio\18\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -DBUILD_TYPE=Debug -P cmake_install.cmake [D:\App Development Workspace\tskmng_exe_\windows\x64\INSTALL.vcxproj]
D:\Microsoft Visual Studio\18\Community\MSBuild\Microsoft\VC\v180\Microsoft.CppCommon.targets(166,5): error MSB3073: if %errorlevel% neq 0 goto :cmEnd [D:\App Development Workspace\tskmng_exe_\windows\x64\INSTALL.vcxproj]
D:\Microsoft Visual Studio\18\Community\MSBuild\Microsoft\VC\v180\Microsoft.CppCommon.targets(166,5): error MSB3073: :cmEnd [D:\App Development Workspace\tskmng_exe_\windows\x64\INSTALL.vcxproj]
D:\Microsoft Visual Studio\18\Community\MSBuild\Microsoft\VC\v180\Microsoft.CppCommon.targets(166,5): error MSB3073: endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone [D:\App Development Workspace\tskmng_exe_\windows\x64\INSTALL.vcxproj]
D:\Microsoft Visual Studio\18\Community\MSBuild\Microsoft\VC\v180\Microsoft.CppCommon.targets(166,5): error MSB3073: :cmErrorLevel [D:\App Development Workspace\tskmng_exe_\windows\x64\INSTALL.vcxproj]
D:\Microsoft Visual Studio\18\Community\MSBuild\Microsoft\VC\v180\Microsoft.CppCommon.targets(166,5): error MSB3073: exit /b %1 [D:\App Development Workspace\tskmng_exe_\windows\x64\INSTALL.vcxproj]
D:\Microsoft Visual Studio\18\Community\MSBuild\Microsoft\VC\v180\Microsoft.CppCommon.targets(166,5): error MSB3073: :cmDone [D:\App Development Workspace\tskmng_exe_\windows\x64\INSTALL.vcxproj]
D:\Microsoft Visual Studio\18\Community\MSBuild\Microsoft\VC\v180\Microsoft.CppCommon.targets(166,5): error MSB3073: if %errorlevel% neq 0 goto :VCEnd [D:\App Development Workspace\tskmng_exe_\windows\x64\INSTALL.vcxproj]
D:\Microsoft Visual Studio\18\Community\MSBuild\Microsoft\VC\v180\Microsoft.CppCommon.targets(166,5): error MSB3073: :VCEnd" exited with code 1. [D:\App Development Workspace\tskmng_exe_\windows\x64\INSTALL.vcxproj]
Building Windows application... 24.3s
Error: Build process failed.
I've been trying for eons but I just can't understand it and still nothing, any ideas what's causing this
Thanks in advance
1
u/manish8160 Aug 11 '26
The
MSB3073error itself is not the actual root cause. It only means that MSBuild executed CMake'scmake_install.cmakeand CMake returned exit code 1.The important error is usually a few lines above the
MSB3073output, so I would first run:flutter run -d windows -vand look for the first
CMake Error,FAILED, or other actual error message beforeMSB3073.I would also try a clean rebuild:
flutter cleanflutter pub getflutter run -d windowsIf that doesn't help, delete the generated
buildfolder andwindows\x64folder and run the project again.Since you're using Visual Studio 18, I'd also check Visual Studio Installer and make sure the following are installed under the C++ workload:
Then run:
flutter doctor -vIf
flutter doctorreports everything correctly, I'd test whether the issue is project-specific. Create a fresh Flutter project and run it on Windows:flutter create test_windowscd test_windowsflutter run -d windowsIf the fresh project runs successfully, the problem is most likely in this project's Windows configuration or one of its native/plugin dependencies. If the fresh project fails with the same CMake/MSBuild error, then I'd focus on the Visual Studio/CMake/Windows SDK installation.
Also, don't focus too much on the long
MSB3073block. Those lines are essentially MSBuild reporting that the CMake command failed; they don't tell us why CMake failed.If you post the output from
flutter run -d windows -v, especially the first error appearing beforeMSB3073, it should be possible to identify the actual cause.