❔ Abusing Maui for Cross Platform XR
Some context first:
I'm working on a set of templates for my code first XR app development library, StereoKit. I've wanted for ages to have a single project that could run on Android, Windows, and Linux, and Maui seems to be set up to enable this sort of thing!
I've already created a template that basically does the majority of what I want (here: https://github.com/StereoKit/StereoKit.Templates), but I've been having some trouble taking it over the finish lines with usability polish. It all works if you know to check hidden boxes, switch multiple menu items, and chant the right incantations.
I suspect the big tricky element is that to get Linux support (which Maui does not do), I had to add a regular
The problems:
There's unfortunately a few issues with the template when used with Visual Studio!
I'm working on a set of templates for my code first XR app development library, StereoKit. I've wanted for ages to have a single project that could run on Android, Windows, and Linux, and Maui seems to be set up to enable this sort of thing!
I've already created a template that basically does the majority of what I want (here: https://github.com/StereoKit/StereoKit.Templates), but I've been having some trouble taking it over the finish lines with usability polish. It all works if you know to check hidden boxes, switch multiple menu items, and chant the right incantations.
I suspect the big tricky element is that to get Linux support (which Maui does not do), I had to add a regular
net7.0 project type to Maui's repertoire. That was a pretty scary delve into MSBuild (which starts over here: https://github.com/StereoKit/StereoKit/blob/develop/StereoKit/SKMaui.targets), but ultimately seems to work.The problems:
There's unfortunately a few issues with the template when used with Visual Studio!
- The Android/Windows target doesn't have the Deploy option set by default, the user has to know to hunt this option down in the Configuration Manager panel. I haven't figured out what controls this.
- The
net7.0-windowstarget is selected by default, and I'd prefer thenet7.0to be the default. Also can't figure out how this is set. - Launching
net7.0-windowsseems to require alaunchSettings.jsonprofile with acommandNameofMsixPackage, otherwise it just silently fails.net7.0will fail unless the profile'scommandNameisProject. Switching to thenet7.0-windowsframework seems to automatically pick theMsixPackageprofile, but switching back tonet7.0does not. This behavior is... not great, and I really don't want to teach this to my users.