How to deploy Android .NET MAUI app to different environments (Dev/Test/Prod) via Azure DevOps CI/CD?
Before we upgraded from Xamarin to .NET MAUI, we had a single Build Pipeline to compile the app for Android, using Release Configuration and settings for Dev environment. Then we had a single Release Pipeline (with Stages for Dev/Test/Prod) which deployed the .apk to App Center. The Test and Prod stages, unpacked the .apk file, updated a config.json and the AndroidManifest.xml files with values for the Test/Prod environment, then re-packed, signed the .apk file and deployed it to App Center.
We were using Scott McDougall's "Pack or unpack an apk file." tool in the Release Pipeline, but now with .NET MAUI, the re-pack of the .apk file is failing with this error...
No resource identifier found for attribute 'lStar' in package 'XXXXXXXX' & Resource is not public
Has anyone experience this, and know a way to fix it? Or is there a better way to deploy to Test and Production with different config/xml values? My workaround is to have separate Test and Production branches in our repo, which have the specific values for each config/xml file, and corresponding Build and Release Pipelines that build/deploy for each. But I'd rather not have to re-build for each environment.