Thank you for reaching out. It sounds like you are encountering a common challenge when packaging desktop application especially with resource management and installer creation. Let's break down how to address these issues for win UI3 app.
Addressing image disappearance and relative path
The ms-appx:/// URI Scheme is the correct way to reference images and other resources that are part of your application's package in win UI3. When these images disappear after publishing or building, it usually indicates that they are not being correctly included in the final application package.
Here's what you should do:
1. verify build actions:
- in Visual Studio, navigate to your SharedResources folder(or wherever your images are located).
- Select the image files.
- In the properties window(usually F4) ensure the build action is set to “content” or “the resource”. Content is generally preferred for files that need to be directly accessible and copied into the output.
- For some scenario, you might also need to set “copy to output directory" to “copy if newer” or “Always”. Though for Ms-appx resources, the build system often handles this when the app package is created. The key is that the files must be part of the project and marked for inclusion.
2. Clean and rebuild:
- after changing build actions or properties, always perform a clean solution and then a rebuild solution in Visual Studio. This ensures that all old build artifacts are removed and project is built fresh with the correct settings
**3. **publish utility configuration:
- If you are using a custom ” Public utility” other specific build process that's causing images to be omitted you will need to review its settings. Ensure, it's configured to include all necessary asset files and not to strip out ms-appx references or the files they point to.
Creating an installer for your win UI3 app
for modern desktop applications like your win UI3 app, the recommended and most robust installer format is MSIX. MSIX provides a more reliable, secure, and efficient installation experience compared to traditional installer.
Here's how you can create an MSIX package:
1. MSIX packaging tool
a. this is a free, standalone tool from Microsoft designed to help you package desktop application into MSIX
b. download
Please let us know if you require any further assistance we’re happy to help. If you found this information useful, kindly mark this as "Accept Answer".