Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AndroidManifest not found with custom configurations #9540

Open
LeoJHarris opened this issue Nov 20, 2024 · 4 comments
Open

AndroidManifest not found with custom configurations #9540

LeoJHarris opened this issue Nov 20, 2024 · 4 comments
Assignees
Labels
Area: App+Library Build Issues when building Library projects or Application projects. need-attention A xamarin-android contributor needs to review

Comments

@LeoJHarris
Copy link

LeoJHarris commented Nov 20, 2024

Description

I've waited nearly an hour on an android project to try publish a release build and its taken so long I gave up on it so posting my concern here. As this is my first attempt on a MAUI release build I cannot comment on previous versions.

Stuck on here:

Image

Steps to Reproduce

  1. Right click project
  2. Select Publish...
  3. Archive...

Link to public reproduction project repository

No response

Version with bug

9.0.10 SR1

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

No response

Did you find any workaround?

NO

Relevant log output

@LeoJHarris
Copy link
Author

LeoJHarris commented Nov 21, 2024

UPDATE:

Got this working through the command line by specifying both the framework and configuration dotnet/maui#24621.

I did initially get an error though through the command line though which was a bit more revealing then the VS GUI.

error XA1018: Specified AndroidManifest file does not exist: C:\xxxx\Platforms\Android\Release\AndroidManifest.xml.

I Resolved this by specifying the --configuration so my guess is perhaps because we use different configurations i.e. AndroidManifest files placed in certain directories, that it defaulted to a Release path although the issue I see here is that it did not honor the AndroidManifest path as defined in the .csproj file like the following

Platforms\Android\XXXXX\AndroidManifest.xml

@PureWeen PureWeen transferred this issue from dotnet/maui Nov 21, 2024
@dotnet-policy-service dotnet-policy-service bot added the needs-triage Issues that need to be assigned. label Nov 21, 2024
@jpobst
Copy link
Contributor

jpobst commented Nov 21, 2024

Any issue(s) with the VS Archiving experience would be owned by the VS integration team who does not use GitHub for issue tracking.

Please use the tools available inside of VS to report this issue. This allows the issue to be routed to the correct team, and provides them the correct logs they need to diagnose it.


As for the command line error:

error XA1018: Specified AndroidManifest file does not exist: C:\xxxx\Platforms\Android\Release\AndroidManifest.xml.

@jonathanpeppers @dellis1972 Would this be expected if custom configurations are being used? Or do we possibly have a bug here?

@jpobst jpobst added Area: App+Library Build Issues when building Library projects or Application projects. and removed needs-triage Issues that need to be assigned. labels Nov 21, 2024
@jpobst jpobst changed the title Android Publishing Gets Stuck on Archiving AndroidManifest not found with custom configurations Nov 21, 2024
@jonathanpeppers
Copy link
Member

It's hard to say without a build log, can you share a .binlog file that contains the error? https://aka.ms/binlog

In general, I would only use Debug and Release for your configuration names, as no one knows the full set of properties you would need to set to make a configuration such as DebugFoo or ReleaseFoo correct:

@jonathanpeppers jonathanpeppers added the need-info Issues that need more information from the author. label Nov 21, 2024
@LeoJHarris
Copy link
Author

@jonathanpeppers We do something like the following to get the full set of properties depending on the Constants defined.

<PropertyGroup Condition="'$(Configuration)'=='ReleaseFoo'">
	<DefineConstants>FOO;RELEASE;</DefineConstants>
</PropertyGroup>

<Choose>
	<When Condition="$(DefineConstants.Contains('FOO'))">
                <PropertyGroup Condition="'$(TargetFramework)' == 'net8.0-android'">
                	<AndroidManifest>Platforms\Android\FOO\AndroidManifest.xml</AndroidManifest>
                </PropertyGroup>
        </When>
<Otherwise>

Also, I have the MSBuild_Logs folder, is there a particular .binlog file you would like or the entire folder? To avoid exposing sensitive information should I share this with you directly?

@dotnet-policy-service dotnet-policy-service bot added need-attention A xamarin-android contributor needs to review and removed need-info Issues that need more information from the author. labels Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: App+Library Build Issues when building Library projects or Application projects. need-attention A xamarin-android contributor needs to review
Projects
None yet
Development

No branches or pull requests

4 participants