© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•11mo ago•
9 replies
Tiger

MAUI runtime identifier build hell

I have a class library that requires me to put in an RID to build it.
To build one of the projects on windows I need to set the
win-x64
win-x64
RID
However when I build a MAUI project on android, I need the
android-arm64
android-arm64
RID

I have set these:
<RuntimeIdentifiers Condition="$([MSBuild]::IsOSPlatform('windows'))">win-x64</RuntimeIdentifiers>
<RuntimeIdentifiers Condition="'$(TargetFramework)' == 'net9.0-android'">android-arm64</RuntimeIdentifiers>
<RuntimeIdentifiers Condition="$([MSBuild]::IsOSPlatform('windows'))">win-x64</RuntimeIdentifiers>
<RuntimeIdentifiers Condition="'$(TargetFramework)' == 'net9.0-android'">android-arm64</RuntimeIdentifiers>


Now it builds fine, but when I build the MAUI project it doesn't build it in a sub-directory for
android-arm64
android-arm64
, when I build the class lib using
 dotnet build -f net9.0-android -r android-arm64
 dotnet build -f net9.0-android -r android-arm64
then the sub-directory is created.

so basically, the MAUI app is looking for the sub-directory that has the RID but that directory does not exist.

The MAUI build also works fine when I do the command
dotnet build -f net9.0-android -r android-arm64
dotnet build -f net9.0-android -r android-arm64
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

✅ Maui HelloWorld App
C#CC# / help
13mo ago
✅ Troubleshooting MAUI build errors
C#CC# / help
2y ago
Maui - pre build targets iOS
C#CC# / help
11mo ago