© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•4y ago•
22 replies
.koujaku

❔ 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
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
net7.0-windows
target is selected by default, and I'd prefer the
net7.0
net7.0
to be the default. Also can't figure out how this is set.
- Launching
net7.0-windows
net7.0-windows
seems to require a
launchSettings.json
launchSettings.json
profile with a
commandName
commandName
of
MsixPackage
MsixPackage
, otherwise it just silently fails.
net7.0
net7.0
will fail unless the profile's
commandName
commandName
is
Project
Project
. Switching to the
net7.0-windows
net7.0-windows
framework seems to automatically pick the
MsixPackage
MsixPackage
profile, but switching back to
net7.0
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!
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources
Was this page helpful?

Similar Threads

Recent Announcements

Similar Threads

✅ MAUI + Web: a cross-platform app
C#CC# / help
3y ago
❔ Cross platform user settings for app.
C#CC# / help
3y ago
❔ avalonia cross platform issue
C#CC# / help
3y ago
❔ Getting cross-platform directories for storing data
C#CC# / help
3y ago