You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Xamarin.Android.Build.Tasks] remove the android\assets\shrunk directory
Context: dotnet#3753
Context: xamarin/monodroid#1053
There appears to be an issue with mono:2019-10 when the Xamarin.Forms
integration project is built with AOT in `Release` mode.
The issue somehow stems from two `Mono.Android.dll` existing:
* `obj\Debug\android\assets\Mono.Android.dll`
* `obj\Debug\android\assets\shrunk\Mono.Android.dll`
Looking at how AOT is invoked, it seems like either `Mono.Android.dll`
could be picked up by the parameters being passed in. We might be
AOT'ing a user's `Foo.dll`, and both directories are in `$MONO_PATH`
or passed via other arguments. How would we know which is picked up?
The `shrunk` directory is used by the `<RemoveRegisterAttribute/>`
MSBuild task that:
* Runs after the linker & `<GenerateJavaStubs/>`
* Removes all the `[RegisterAttribute]` from types, to further shrink
`Mono.Android.dll`.
It looks like we copy all `@(_ResolvedFrameworkAssemblies)` to the
`shrunk` directory and fix up item groups. Why don't we just get rid
of this `shrunk` directory and not copy anything? We can edit
`Mono.Android.dll` in place, and incremental builds should be fine due
to the use of stamp files.
I also moved the flag file to:
$(_AndroidStampDirectory)_RemoveRegisterAttribute.stamp
To match our new MSBuild conventions.
There is also usage of `@(_ShrunkFrameworkAssemblies)` that needs to
be updated in monodroid.
0 commit comments