Hello, @rhubarb.geek.nz
It seems there’s an issue with the Single-project MSIX Packaging Tools, or with some part of VS that only surfaces when packaging in the same project. When using the single-project format, the AppxManifest.xml generated will have the runFullTrust re-added to the capabilities list. It’s also added in the wrong order per the schema, so that new AppxManifest fails validation, hence the manifest vs schema error we’re seeing.
Splitting the project referenced (myfeeder / Code / [r47] /trunk/winui3/MyFeeder (sourceforge . net)) into separate packaging and base projects allowed me to get it to build without issue. In addition, the separate packaging project does not re-add the runFullTrust capability, so you can see the Low Mandatory Level integrity flag, indicating we’re at partial trust. You can read more about partial trust and WinUI 3 here: https://github.com/microsoft/WindowsAppSDK/discussions/1900#discussioncomment-1791826
To split, the you can basically go through the Package your app using single-project MSIX - Windows apps | Microsoft Learn article backwards. Leaving the launchSettings.json or Package.appxmanifest files doesn’t hurt anything so you can keep those in the project. The only real change to the original project is the commenting of two XML nodes.
- Double-click the MyFeeder project.
- Comment out / remove:
oEnablePreviewMsixTooling
oPublishProfile - Add a new project to the solution using the “Windows Application Packaging Project” template.
- Set the new project as the startup project.
- Add a project reference to the MyFeeder project.
oExpand the new project -> Dependencies -> Applications
oSelect MyFeeder
oSet the Trust Level to “Partial Trust” - Replace the Package.appxmanifest with the one from the MyFeeder project.
That should resolve the issue for now.