question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

Context: https://github.com/xamarin/xamarin-android/pull/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?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
marcpopMSFTcommented, May 19, 2021

Triage: You’re welcome to just use the property as is. We don’t think it’s worth changing at this time and it’s ok for you to use this property (with the warning that we aren’t as careful when making changes to internal properties)

0reactions
marcpopMSFTcommented, May 19, 2021

Closing per above as I think you have the path forward.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Build Properties - Xamarin
NET 6 + builds. Added in Xamarin.Android 9.2. AndroidEnableProfiledAot. A boolean property that determines whether or not the AOT profiles are ...
Read more >
MSBuild reference for .NET SDK projects
In .NET 6 and later versions, you can use the ProduceReferenceAssemblyInOutDir property to control whether reference assemblies are written to ...
Read more >
Building an Android app with .NET 6 - Nick's .NET Travels
Go to the Download .NET 6.0 page and pick the appropriate SDK. Go to the Net6-Mobile-Samples repro and grand the installers for the...
Read more >
.NET 6.0 and .NET MAUI : r/dotnet
I'm interested in developing applications, but I am confused about the current and future state of .NET. To my understanding, .
Read more >
Android for .NET 6: The .NET Show with Carl Franklin Ep 14
Carl welcomes Microsoft's Jonathan Peppers to talk about how Android projects work in . NET 6 ⚡️⚡️⚡️ Register your FREE COPY of ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found