Skip to content

[android] .NET 6 usage of $(_GetChildProjectCopyToPublishDirectoryItems) #14619

@jonathanpeppers

Description

@jonathanpeppers

Context: dotnet/android#5308

Android can't support the @(Content) build action because of the way Android apps remain compressed when they are installed on disk.

So for example, if you did:

<Content Include="Foo.txt" CopyToOutputDirectory="PreserveNewest" />

We can't possibly put this in a location where File.OpenRead ("Foo.txt") would work when the app is running on Android. Developers instead would use @(AndroidAsset) and use Android APIs to access a Stream of the file. We emit a build warning in any Android project using @(Content).

All that to say, we are setting$(_GetChildProjectCopyToPublishDirectoryItems) to false for Android projects. Should this property be renamed so it is public? Drop the underscore?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions