Packaging
Learn how to package your custom widget to be used for the BeWidgets app.
Custom widget packages are saved in a .wpkg
archive file format. Only these files can be installed into the BeWidgets app.
INFO
For this tutorial you'll need the BeWidgets app.
Build a Custom Widget for Packaging
- Build your project using the Release configuration with the Unpackaged startup option. With this configuration App.xaml with WidgetApplication class as a parent won't simulate the BeWidgets app environment, but will make it ready for packaging.
IMPORTANT
Running the project with the Unpackaged startup option is MANDATORY, otherwise you won't be able to package it!
- Right click your project in the Solution Explorer and select Build.
Package a Custom Widget Build
With the previously created Release build you can now package your widget.
- Open the BeWidgets app. Navigate to Settings -> Advanced and enable Show developer tools menu. A developer tools menu item should appear in the bottom left corner with a hint.
- Navigate to the Developer tools. Search for the Widget packcager card and click Create package, a Widget Packager window should appear.
- Next to the Widget executable location click the Browse button, navigate to the build output folder (
PATH-TO-YOUR-PROJECT/PROJECT-NAME/bin/x64/Release/net6.0-windows10.0.19041.0/win10-x64/WIDGET-NAME.exe
) and select the only executable with your project name (WIDGET-NAME.exe
). Widget Packager should now automatically specify the Output location (You can choose your own output location).
TIP
You can select the Install after packaging option to automatically install your widget without the need to install it later.
Click Create to create a widget packcage. A loading bar should appear to indicate that a packaging process has started.
If you have checked the Install after packaging option, you now should see the Installing widget dialog, otherwise a file explorer window will appear with your Widget Package. To install it, please visit the Sideloading a Widget Package page.
INFO
If you have previously installed your Widget Package you'll be prompted to choose whether or not you want to update it.