| title | Packaging Electron apps as MSIX |
|---|---|
| description | Learn how to create MSIX packages for distributing your Electron app with Windows APIs using the winapp CLI. |
| ms.date | 02/20/2026 |
| ms.topic | how-to |
This guide shows you how to create an MSIX package for distributing your Electron app with Windows APIs.
- Completed the development environment setup
- Verified your app runs correctly with
npm start
Before packaging, configure your build tool to exclude temporary files from the final build:
.winapp/folderwinapp.yaml- Certificate files (
.pfx) - Debug symbols (
.pdb) - C# build artifacts (
obj/,bin/folders) - MSIX packages (
*.msix)
Verify that your appxmanifest.xml Executable attribute points to the correct .exe file.
This approach gives you more control and works with any Electron packager.
npx electron-forge packageThis creates a production version in the ./out/ folder.
npx winapp pack .\out\<your-app-folder> --output .\out --cert .\devcert.pfx --manifest .\appxmanifest.xmlReplace <your-app-folder> with the actual folder name created by Electron Forge (for example, my-windows-app-win32-x64).
Tip
Add these commands to your package.json scripts for convenience:
{
"scripts": {
"package-msix": "npx electron-forge package && npx winapp pack ./out/my-windows-app-win32-x64 --output ./out --cert ./devcert.pfx --manifest appxmanifest.xml"
}
}If you're already using Electron Forge, you can integrate MSIX packaging directly.
npm install --save-dev @electron-forge/maker-msixmodule.exports = {
makers: [
{
name: '@electron-forge/maker-msix',
config: {
appManifest: '.\\appxmanifest.xml',
windowsSignOptions: {
certificateFile: '.\\devcert.pfx',
certificatePassword: 'password'
}
}
}
],
};Update the Executable path to point to the app folder:
<Applications>
<Application Id="myApp"
Executable="app\my-app.exe"
EntryPoint="Windows.FullTrustApplication">
</Application>
</Applications>npm run makeThe MSIX package will be created in ./out/make/msix/.
Install the development certificate (one-time setup, run as administrator):
npx winapp cert install .\devcert.pfxInstall the MSIX package:
Add-AppxPackage .\my-windows-app.msixYour app will appear in the Start Menu.
Submit your app for the widest distribution and automatic updates. Learn more: Publish your app to the Microsoft Store.
Host the MSIX package on your website. Sign it with a trusted certificate authority (CA) certificate.
Distribute via Company Portal (Intune), direct download, or sideloading. Learn more: Distribute apps outside the Store.
Create an .appinstaller file for automatic updates. Learn more: App Installer file overview.