---
title: "Releasing for Windows"
description: "Build a Shorebird Windows release, then package it as an MSIX for the Microsoft Store or with an installer such as Inno Setup, WiX or NSIS."
---

This page covers packaging a Shorebird Windows release as an MSIX for the Microsoft Store, and with other installers. Whichever you use, package the output of `shorebird release windows`, not a separate `flutter build windows`.

## Packaging for the Microsoft Store (MSIX)

To submit an app to the Microsoft Store, you need an **MSIX** package. [`package:msix`](https://pub.dev/packages/msix) is a common way to produce that file from a Flutter Windows build. By default it runs `flutter build windows` with the Flutter SDK on your `PATH`, not Shorebird’s Flutter. That rebuild is not a Shorebird release, so patches will not apply.

Build with Shorebird first, then tell `package:msix` to package the existing output.

### Step 1: Create a Shorebird Windows release

```
shorebird release windows
```

The Windows executable is written to `build/windows/x64/runner/Release`. See [Create a Release](/code-push/release/) for flavors, targets, and `--flutter-version`.

### Step 2: Disable the MSIX rebuild

Add [`package:msix`](https://pub.dev/packages/msix) as a dev dependency if you do not already use it:

```
flutter pub add dev:msix
```

Then set `build_windows: false` in the `msix_config` section of `pubspec.yaml`:

```
msix_config:
  display_name: My App
  publisher_display_name: Example
  publisher: CN=00000000-0000-0000-0000-000000000000
  identity_name: com.example.myapp
  msix_version: 1.0.0.0
  store: true
  build_windows: false
```

`build_windows: false` skips `flutter build windows` and packages the directory Shorebird already produced.

Copy `identity_name`, `publisher`, and `publisher_display_name` from Partner Center (Product identity). With `store: true`, `package:msix` refuses to build if any of them is missing. The fourth part of `msix_version` must be `0` for Store submissions.

### Step 3: Create the MSIX package

```
dart run msix:create
```

Submit the generated `.msix` file to the Microsoft Store.

Caution

After `shorebird release windows`, do not run `flutter build windows`, `shorebird patch windows`, or `msix:create` without `build_windows: false` before creating the MSIX. Each of those rebuilds into the same output directory, so the resulting MSIX would not match the release and would not receive patches.

## Packaging with other installers

Any installer that copies files, such as Inno Setup, WiX or NSIS, can package a Shorebird release. Shorebird needs no installer-specific setup, as long as the installer copies the release output as it is.

* **Package the whole `build\windows\x64\runner\Release` directory, unchanged.** Keep its layout: the app reads `data\app.so`, and `shorebird.yaml` in `data\flutter_assets`, relative to the `.exe`.
* **Don’t modify `data\app.so`.** Patches are applied on top of the `app.so` that `shorebird release windows` uploaded. If the installed file differs, the updater rejects every patch with a hash mismatch.
* **Don’t change the `.exe`’s version.** Shorebird reads the release version from the `.exe`’s `ProductVersion`, the same value `shorebird release windows` recorded. An installer’s own version field, such as Inno Setup’s `AppVersion`, doesn’t change it. You can still code-sign the `.exe`, DLLs and the installer.
* **Install anywhere, including `Program Files`.** Shorebird only reads from the install directory. Patches are downloaded to `%LOCALAPPDATA%\shorebird_updater\<app_id>`, which each Windows user can write to, so no admin rights are needed to apply a patch. On a machine with several users, each user downloads patches separately.

A minimal Inno Setup script, saved in the root of your Flutter project, looks like this:

installer.iss

```
[Setup]
AppName=My App
AppVersion=1.0.0
DefaultDirName={autopf}\My App
OutputBaseFilename=my_app_setup
ArchitecturesAllowed=x64compatible
ArchitecturesInstallIn64BitMode=x64compatible

[Files]
Source: "build\windows\x64\runner\Release\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs

[Icons]
Name: "{autoprograms}\My App"; Filename: "{app}\my_app.exe"
```

Replace `my_app.exe` with your app’s executable name. Compile the installer from the output of the `shorebird release windows` run that created the release. Running `flutter build windows` or `shorebird patch windows` in between overwrites that directory with a build that doesn’t match the release, and patches won’t apply to it.
