Closed michaelonz closed 4 days ago
If you are using the single project approach then there probably is a version number in the csproj file of your project that you want to update instead of the one in the Android manifest file. It might get overridden if you update that directly.
Otherwise it is pretty hard to tell what might be the cause of this without seeing logs of your exact GitHub Action script.
I do feel that this is not necessarily something that is an issue in .NET MAUI or originates here, else we would've heard more about this. Feel free to contact me directly through email (find it on my GitHub profile) and we'll see if we can figure it out there.
If it turns out to be something on our side I'll open a new issue or update this one with the details.
Thanks!
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