Skip to content

Conversation

@jonathanpeppers
Copy link
Member

Backport of #7151

Context: xamarin/GooglePlayServicesComponents#652

In .NET 6, @(AndroidLibrary.Pack) defaults to true (97190b6), while
%(LibraryProjectZip.Pack) was never set, and thus was false. This
would be an issue if you migrated a project using @(LibraryProjectZip) and were
not relying on the default wildcards used by:

<AndroidLibrary Include="**/*.aar" />

The result is that .aar files weren't included into the .nupkg,
which would result in subsequent build & packaging errors when
using the .nupkg, as the .aar was missing.

Set %(LibraryProjectZip.Pack)=True by default in .NET 6+, to ease
project migration from Classic Xamarin.Android to .NET 6.

I updated a test for this scenario and fixed some assertions that are
working since 2ca2a10 was merged.

…tnet#7151)

Context: xamarin/GooglePlayServicesComponents#652

In .NET 6, `@(AndroidLibrary.Pack)` defaults to true (97190b6), while
`%(LibraryProjectZip.Pack)` was never set, and thus was false.  This
would be an issue if you migrated a project using `@(LibraryProjectZip)` and were
not relying on the default wildcards used by:

	<AndroidLibrary Include="**/*.aar" />

The result is that `.aar` files weren't included into the `.nupkg`,
which would result in subsequent build & packaging errors when
using the `.nupkg`, as the `.aar` was missing.

Set `%(LibraryProjectZip.Pack)`=True by default in .NET 6+, to ease
project migration from Classic Xamarin.Android to .NET 6.

I updated a test for this scenario and fixed some assertions that are
working since 2ca2a10 was merged.
@jonathanpeppers
Copy link
Member Author

I opened this, so we won't forget to backport this. We can wait a bit to merge.

@jonathanpeppers
Copy link
Member Author

1 failure we can ignore, we've seen these happening lately:

image

@jonathanpeppers jonathanpeppers merged commit 8252660 into dotnet:release/6.0.4xx Aug 1, 2022
@jonathanpeppers jonathanpeppers deleted the backport-LibraryProjectZip branch August 1, 2022 13:22
@github-actions github-actions bot locked and limited conversation to collaborators Jan 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants