I'd like to use different values for dev,qa,prod environments in .Net MAUI app AndroidManifest.xml file or different version of the file like AndroidManifest.dev.xml, AndroidManifest.release.xml.
I could not find any example, can someone point me right direction?
Thanks,
Configuration files provide an easy and efficient way to manage environment based settings and variables. You can start by following steps:
1.creating Build Configurations in your project
2.Configure Android Manifest Files for your Environments
You can start by creating
AndroidManifest
for all your environments. You can duplicate the existingAndroidManifest.xml
and rename it for each environment in your solution.And then edit your
.csproj
file:3.Set up Environment Based Configuration.
4.Read Configurations
Note:
The specific method of setting and reading variables is different, but the overall implementation process is similar.
For more information, you can refer to the following links:
How to switch AndroidManifest.xml for multiple Android builds.
Managing Configurations.