flet build windows --v failed to run on Windows 11
Duplicate Check
- [x] I have searched the opened issues and there are no duplicates
Describe the bug
So i created an apps that wanna be deployed on both windows 10 and windows 11
Firstly, i have built the application in Windows 10 and it works fine! And when this problem happend i have set all things the same like i did on windows 10, from Visual Studio version, installed sdk, flet version, python version, and even flutter version
And last but not least, i have tried to build flutter dummy apps, and it compiled and run finely, so it likely not the flutter problems
So i have tried all things that i could but nothings can fix my problem.
Code sample
Code
# C:\Users\Steph\Desktop\csv\reader\test\main.py
import flet as ft
def main(page: ft.Page):
page.add(ft.Text("Hello from Flet!"))
ft.app(target=main)
# C:\Users\Steph\Desktop\csv\reader\test\
flet build windows
To reproduce
flet build windows on a directory with main.py file containing your flet app code
Expected behavior
A successful build.
Screenshots / Videos
Windows 10 build
Visual Studio installation details
Windows 11 build
Visual Studio installation details
Operating System
Windows
Operating system details
Windows 10 and Windows 11
Flet version
0.27.1
Regression
No, it isn't
Suggestions
No response
Logs
Logs
# This was runned on Windows 11
C:\Users\Steph\Desktop\csv\reader>flet build windows --v
[22:23:29] Ensure Flutter has desktop support enabled
Run subprocess: ['C:\\Users\\Steph\\flutter\\3.27.4\\bin\\flutter.bat', 'config', '--no-version-check', '--suppress-analytics',
'--enable-windows-desktop']
Setting "enable-windows-desktop" value to "true".
You may need to restart any open editors for them to read new settings.
Flutter 3.27.4 installed ✅
Flutter executable: C:\Users\Steph\flutter\3.27.4\bin\flutter.bat
Dart executable: C:\Users\Steph\flutter\3.27.4\bin\dart.bat
Created Flutter bootstrap project from gh:flet-dev/flet-build-template with ref "0.27.1" ✅
Run subprocess: ['C:\\Users\\Steph\\flutter\\3.27.4\\bin\\dart.bat', 'run', '--suppress-analytics', 'serious_python:main', 'package',
'C:\\Users\\Steph\\Desktop\\csv\\reader\\src', '--platform', 'Windows', '--requirements', 'flet==0.27.1,pandas', '--exclude', 'build,assets',
'--compile-app', '--compile-packages', '--cleanup-app', '--cleanup-packages', '--skip-site-packages']
[22:23:30] Running package command
Extra PyPi indexes: [https://pypi.flet.dev]
Created temp directory: C:\Users\Steph\AppData\Local\Temp\serious_python_temp5066dbd5
Copying Python app from C:\Users\Steph\Desktop\csv\reader\src to a temp directory
Compiling Python sources in a temp directory
Cleanup app
Creating app archive at C:\Users\Steph\Desktop\csv\reader\build\flutter\app/app.zip from a temp directory
Writing app archive hash to C:\Users\Steph\Desktop\csv\reader\build\flutter\app/app.zip.hash
Deleting temp directory
Packaged Python app ✅
Customized app icons and splash images ✅
Run subprocess: ['C:\\Users\\Steph\\flutter\\3.27.4\\bin\\dart.bat', 'run', '--suppress-analytics', 'flutter_launcher_icons']
[22:23:31] ════════════════════════════════════════════
FLUTTER LAUNCHER ICONS (v0.14.3)
════════════════════════════════════════════
• Creating default icons Android
• Overwriting the default Android launcher icon with a new icon
• Creating adaptive icons Android
• Updating colors.xml with color for adaptive icon background
• Creating mipmap xml file Android
• Overwriting default iOS launcher icon with new icon
[22:23:32] Creating Icons for Web...
Creating Icons for Windows...
Creating Icons for MacOS...
✓ Successfully generated launcher icons
Generated app icons ✅
Run subprocess: ['C:\\Users\\Steph\\flutter\\3.27.4\\bin\\flutter.bat', 'build', 'windows', '--no-version-check', '--suppress-analytics',
'--build-number', '1', '--build-name', '1.0.0']
[22:23:33]
[22:23:54] Building Windows application...
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073: The
command "setlocal [C:\Users\Steph\Desktop\csv\reader\build\flutter\build\windows\x64\INSTALL.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073:
"C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe"
-DBUILD_TYPE=Release -P cmake_install.cmake [C:\Users\Steph\Desktop\csv\reader\build\flutter\build\windows\x64\INSTALL.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073: if
%errorlevel% neq 0 goto :cmEnd [C:\Users\Steph\Desktop\csv\reader\build\flutter\build\windows\x64\INSTALL.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073:
:cmEnd [C:\Users\Steph\Desktop\csv\reader\build\flutter\build\windows\x64\INSTALL.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073:
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone [C:\Users\Steph\Desktop\csv\reader\build\flutter\build\windows\x64\INSTALL.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073:
:cmErrorLevel [C:\Users\Steph\Desktop\csv\reader\build\flutter\build\windows\x64\INSTALL.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073: exit
/b %1 [C:\Users\Steph\Desktop\csv\reader\build\flutter\build\windows\x64\INSTALL.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073:
:cmDone [C:\Users\Steph\Desktop\csv\reader\build\flutter\build\windows\x64\INSTALL.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073: if
%errorlevel% neq 0 goto :VCEnd [C:\Users\Steph\Desktop\csv\reader\build\flutter\build\windows\x64\INSTALL.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073:
:VCEnd" exited with code 1. [C:\Users\Steph\Desktop\csv\reader\build\flutter\build\windows\x64\INSTALL.vcxproj]
Building Windows application... 20.8s
Build process failed.
<_io.TextIOWrapper name=4 encoding='utf8'>
Run subprocess: ['C:\\Users\\Steph\\flutter\\3.27.4\\bin\\flutter.bat', 'doctor', '--no-version-check', '--suppress-analytics']
[22:23:56] Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 3.27.4, on Microsoft Windows [Version 10.0.26100.3194], locale en-ID)
[√] Windows Version (Installed version of Windows is version 10 or higher)
[!] Android toolchain - develop for Android devices (Android SDK version 35.0.1)
X cmdline-tools component is missing
Run `path/to/sdkmanager --install "cmdline-tools;latest"`
See https://developer.android.com/studio/command-line for more details.
X Android license status unknown.
Run `flutter doctor --android-licenses` to accept the SDK licenses.
See https://flutter.dev/to/windows-android-setup for more details.
[√] Chrome - develop for the web
[√] Visual Studio - develop Windows apps (Visual Studio Build Tools 2022 17.13.4)
[√] Android Studio (version 2024.3)
[√] VS Code (version 1.99.1)
[√] Connected device (3 available)
[√] Network resources
! Doctor found issues in 1 category.
╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ Error building Flet app - see the log of failed command above. │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
C:\Users\Steph\Desktop\csv\reader>
Additional details
No response