MAUI Project Unable to publish Android APK - Help?
So I'm developing a C#/MAUI application and I am having issues publishing a release/debug build. The project builds just fine just the publishing is causing an error anyone have experience with this?
(On a release build)
0>Xamarin.Android.Common.targets(519,3): Error XA1030 : The 'RunAOTCompilation' MSBuild property is only supported when trimming is enabled. Edit the project file in a text editor to set 'PublishTrimmed' to 'true' for this build configuration.
(On a debug build)
1>Xamarin.Android.Common.targets(1426,3): Error XALNS7028 : System.IO.FileNotFoundException: Could not load assembly 'System.Runtime, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. Perhaps it doesn't exist in the Mono for Android profile?
File name: 'System.Runtime.dll'
Any ideas on how to solve this? I can test my app on Windows/Android etc. but on publish I have the error above
2 Replies
Edit the project file in a text editor to set 'PublishTrimmed' to 'true' for this build configurationdid you read the error message ?
yeah I did that arleady and it still not working and unloading and reloading etc