Migrate a Windows project to set version information
Flutter 3.3 added support for setting the Windows app's version from the pubspec.yaml
file or through the --build-name
and --build-number
build arguments. For more information, refer to the Build and release a Windows app documentation.
Projects created before Flutter version 3.3 need to be migrated to support versioning.
Migration steps
#Your project can be updated using these steps:
- Verify you are on Flutter version 3.3 or newer using
flutter --version
- If needed, use
flutter upgrade
to update to the latest version of the Flutter SDK - Backup your project, possibly using git or some other version control system
- Delete the
windows/runner/CMakeLists.txt
andwindows/runner/Runner.rc
files - Run
flutter create --platforms=windows .
- Review the changes to your
windows/runner/CMakeLists.txt
andwindows/runner/Runner.rc
files - Verify your app builds using
flutter build windows
Example
#PR 721 shows the migration work for the Flutter Gallery app.
Was this page's content helpful?
Thank you for your feedback!
Provide details Thank you for your feedback! Please let us know what we can do to improve.
Provide details Unless stated otherwise, the documentation on this site reflects the latest stable version of Flutter. Page last updated on 2024-04-04. View source or report an issue.