Building app on github actions is not updating AndroidManifest.xml #22091
Labels
area-single-project
Splash Screen, Multi-Targeting, MauiFont, MauiImage, MauiAsset, Resizetizer
platform/android 🤖
s/triaged
Issue has been reviewed
t/bug
Something isn't working
Description
I am using github actions to publish an app to google play and it is consistently failing with the following error when i send it to the play store.
"Error: Version code 194 has already been used."
This is because the androidmanifest is not being updated when i build using the commandline on github. I have verified this by downloading the .aab file and opening the manifest inside - it is using the old version # still (194) - the new version is 195 but the build ignores it because the android manifest is not being updated during the build from platforms\android\androidmanifest.xml
NOTE: If i build from inside visual studio it works fine.
If I build from the commandline on windows dev pc (not github) then it also works - eg I can open the aab file and confirm the version has updated.
NOTE: I am only building for android (at this stage) but if i dont do the workload restore for IOS then github also throws an error on that.
Below is the first part of the script (.yml) that i am using to kick off the build process.
name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.*
name: Install MAUI workload
run: dotnet workload restore
name: install workload Android
run: dotnet workload install android
name: install workload IOS
run: dotnet workload install maui-ios
name: Restore Dependencies
run: dotnet restore APP.sln
name: dotnet clean
run: dotnet clean -f:net8.0-android -c:Release APP.sln
name: Build
run: dotnet build -f:net8.0-android --no-incremental -c:Release APP.sln --artifacts-path \mybuild
Steps to Reproduce
Kick of the build script from github actions.
Link to public reproduction project repository
No response
Version with bug
8.0.20 SR4
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
Unknown/Other
Affected platforms
Android
Affected platform versions
all i assume
Did you find any workaround?
no - at this stage I cant publish my app
Relevant log output
The text was updated successfully, but these errors were encountered: