FarHard112
FarHard112

Reputation: 75

How to include Visual C++ Redistributable (VCRedist) in a Flutter Windows app for Microsoft Store?

I have developed a Windows application using Flutter and I want to distribute it through the Microsoft Store. I have created an installer and generated an MSIX package from it. However, my application requires the Visual C++ Redistributable (VCRedist) x64 2022 library to run properly. How can I include the VCRedist library in my Flutter Windows application when submitting it to the Microsoft Store? I have considered the following options:

Bundling the VCRedist installer with my application installer and running it during the installation process. However, I'm not sure if this approach is suitable for Microsoft Store submissions. Statically linking the required Visual C++ libraries into my Flutter application. I've read that this can be done by modifying the build configuration and linking against the static versions of the libraries, but I'm not sure about the specific steps involved. Specifying the VCRedist as a prerequisite for my application in the Microsoft Store listing. Is there a way to ensure that the VCRedist is automatically installed when a user downloads my application from the Store?

I would appreciate any guidance or best practices on how to properly include the VCRedist library in a Flutter Windows application for Microsoft Store distribution. If static linking is the recommended approach, please provide any relevant instructions or resources. Thank you in advance !

Upvotes: 1

Views: 439

Answers (1)

Voina Alex
Voina Alex

Reputation: 11

Have you looked at Flutter's guide for releasing apps on Windows?

https://docs.flutter.dev/platform-integration/windows/building#building-your-own-zip-file-for-windows

I have released multiple times my Flutter app on MS Store and here's what I used to do:

Place these dll s, next to my '.exe', create the msix package & upload it to Microsoft. IIRC you should see the dll s disappear, after the msix is created.

msvcp140.dll vcruntime140.dll vcruntime140_1.dll

I'm not really sure whether or not it is actually needed though.

You see in the Flutter docs, the Visual C++ redistributables are mentioned only in the final section "Building your own zip file for Windows".

Upvotes: 1

Related Questions