Operating System
Windows 10
Plugin
package_info_plus
Version
package_info_plus: ^10.0.0
Flutter SDK
Flutter 3.41.6
Compilation command
Using package_info_plus pulls win32 v6 which requires native compilation.
This causes build_runner to fail on systems without MSVC, even when not targeting Windows desktop.
Is there a way to:
- avoid triggering native builds in non-Windows contexts, or
- make win32 optional / lazily loaded?
This currently affects typical Flutter workflows that don’t involve Windows builds.
Temp Fix:
dependency_overrides:
win32: 5.5.0
Dart Dependencies
environment:
sdk: ^3.11.4
dependencies:
flutter:
sdk: flutter
cupertino_icons:
flutter_bloc:
freezed_annotation:
json_annotation:
drift:
sqlite3_flutter_libs:
path_provider:
path:
get_it:
go_router:
flutter_screenutil:
image_picker:
crop_your_image:
image_background_remover:
intl:
package_info_plus:
shared_preferences:
dependency_overrides:
win32: 5.5.0
dev_dependencies:
flutter_test:
sdk: flutter
flutter_lints:
freezed:
build_runner:
json_serializable:
drift_dev:
Native dependencies
Compilation Error
dart run build_runner watch --delete-conflicting-outputs
Building package executable... (4.0s)
Built build_runner:build_runner.
6s compiling builders/jit
Running build hooks...INFO: Could not find files for the given pattern(s).
No compiler configured on host 'windows_x64' with target 'windows_x64'.
Unhandled exception:
System not configured correctly: No compiler configured on host 'windows_x64' with target 'windows_x64'.
#0 CompilerResolver.resolveCompiler (package:native_toolchain_c/src/cbuilder/compiler_resolver.dart:59:5)
<asynchronous suspension>
#1 RunCBuilder.compiler (package:native_toolchain_c/src/cbuilder/run_cbuilder.dart:96:44)
<asynchronous suspension>
#2 RunCBuilder.run (package:native_toolchain_c/src/cbuilder/run_cbuilder.dart:121:27)
<asynchronous suspension>
#3 CBuilder.run (package:native_toolchain_c/src/cbuilder/cbuilder.dart:205:5)
<asynchronous suspension>
#4 main.<anonymous closure> (file:///r:/dev-caches/pub-cache/hosted/pub.dev/win32-6.0.0/hook/build.dart:170:5)
<asynchronous suspension>
#5 build (package:hooks/src/api/build_and_link.dart:191:5)
<asynchronous suspension>
#6 main (file:///r:/dev-caches/pub-cache/hosted/pub.dev/win32-6.0.0/hook/build.dart:146:3)
<asynchronous suspension>
Building assets for package:win32 failed.
build.dart returned with exit code: 255.
To reproduce run:
(cd R:\dev-caches\pub-cache\hosted\pub.dev\win32-6.0.0\; R:\DevelopmentRequirements\flutter_windows_3.32.8-stable\bin\cache\dart-sdk\bin\dart.exe --packages=R:\flutter_dev\wardrobesnap\.dart_tool\package_config.json R:\flutter_dev\wardrobesnap\.dart_tool\hooks_runner\win32\8e04c28b44\hook.dill --config=R:\flutter_dev\wardrobesnap\.dart_tool\hooks_runner\win32\8e04c28b44\input.json )
stderr:
INFO: Could not find files for the given pattern(s).
No compiler configured on host 'windows_x64' with target 'windows_x64'.
Unhandled exception:
System not configured correctly: No compiler configured on host 'windows_x64' with target 'windows_x64'.
#0 CompilerResolver.resolveCompiler (package:native_toolchain_c/src/cbuilder/compiler_resolver.dart:59:5)
<asynchronous suspension>
#1 RunCBuilder.compiler (package:native_toolchain_c/src/cbuilder/run_cbuilder.dart:96:44)
<asynchronous suspension>
#2 RunCBuilder.run (package:native_toolchain_c/src/cbuilder/run_cbuilder.dart:121:27)
<asynchronous suspension>
#3 CBuilder.run (package:native_toolchain_c/src/cbuilder/cbuilder.dart:205:5)
<asynchronous suspension>
#4 main.<anonymous closure> (file:///r:/dev-caches/pub-cache/hosted/pub.dev/win32-6.0.0/hook/build.dart:170:5)
<asynchronous suspension>
#5 build (package:hooks/src/api/build_and_link.dart:191:5)
<asynchronous suspension>
#6 main (file:///r:/dev-caches/pub-cache/hosted/pub.dev/win32-6.0.0/hook/build.dart:146:3)
<asynchronous suspension>
stdout:
Running `where vswhere.exe`.
Running `C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe`.
Running `C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe -format json -utf8 -latest -products *`.
Running build hooks...Error: Running build hooks failed.
Flutter Doctor
flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 3.41.6, on Microsoft Windows [Version 10.0.19045.6456], locale en-US)
[√] Windows Version (10 Pro 64-bit, 22H2, 2009)
[√] Android toolchain - develop for Android devices (Android SDK version 36.0.0)
[√] Chrome - develop for the web
[√] Connected device (2 available)
[√] Network resources
• No issues found!
Checklist before submitting a bug
Operating System
Windows 10
Plugin
package_info_plus
Version
package_info_plus: ^10.0.0
Flutter SDK
Flutter 3.41.6
Compilation command
Using package_info_plus pulls win32 v6 which requires native compilation.
This causes build_runner to fail on systems without MSVC, even when not targeting Windows desktop.
Is there a way to:
This currently affects typical Flutter workflows that don’t involve Windows builds.
Temp Fix:
dependency_overrides:
win32: 5.5.0
Dart Dependencies
Native dependencies
Compilation Error
Flutter Doctor
Checklist before submitting a bug
flutter pub upgradeflutter clean