Open jonathanpeppers opened 2 days ago
net9.0-android
any
Context: https://github.com/dotnet/android/pull/9525 Context: https://github.com/dotnet/runtime/issues/109724
As seen in the above issue, there is currently the expectation in .NET:
PublishTrimmed=true
illink
dotnet build
dotnet publish
PublishTrimmed
Unfortunately, Android doesn't follow this pattern:
PublishTrimmed=false
To fix this in .NET 10, we should:
dotnet new android
For the case above you could set $(_DefaultValueAttributeSupport) as done in https://github.com/dotnet/android/pull/9525.
$(_DefaultValueAttributeSupport)
Android framework version
net9.0-android
Affected platform version
any
Description
Context: https://github.com/dotnet/android/pull/9525 Context: https://github.com/dotnet/runtime/issues/109724
As seen in the above issue, there is currently the expectation in .NET:
PublishTrimmed=true
set for all configurations, it means "I intend to trim this project"illink
. For console apps,dotnet build
doesn't trim orillink
,dotnet publish
does trim and runillink
.PublishTrimmed
Unfortunately, Android doesn't follow this pattern:
PublishTrimmed=false
for build performance, inner loopPublishTrimmed=true
To fix this in .NET 10, we should:
PublishTrimmed=true
alwaysillink
in Debug mode via other meansSteps to Reproduce
dotnet new android
dotnet build
(debug mode)Did you find any workaround?
For the case above you could set
$(_DefaultValueAttributeSupport)
as done in https://github.com/dotnet/android/pull/9525.