.koujaku
.koujaku
CC#
Created by .koujaku on 2/4/2023 in #help
❔ 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 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-windows target is selected by default, and I'd prefer the net7.0 to be the default. Also can't figure out how this is set. - Launching net7.0-windows seems to require a launchSettings.json profile with a commandName of MsixPackage, otherwise it just silently fails. net7.0 will fail unless the profile's commandName is Project. Switching to the net7.0-windows framework seems to automatically pick the MsixPackage profile, but switching back to net7.0 does not. This behavior is... not great, and I really don't want to teach this to my users. There's likely more issues, but these are the ones on top of my mind right now. Any recommendations or insight is quite welcome!
23 replies