-
Notifications
You must be signed in to change notification settings - Fork 533
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CategoryAttribute is places on several properties in ActivityAttribute #5373
Comments
Context: I asked the IDE team if anyone knows if it should work or not. Not heard back yet. |
jonathanpeppers
added a commit
to jonathanpeppers/xamarin-android
that referenced
this issue
Dec 4, 2020
…ops (dotnet#2866)" Fixes: dotnet#5373 This reverts commit d548ec9. Decoration of `ApplicationAttribute.Label` with: [System.ComponentModel.Category ("@string")] public string? Label {get; set;} Allowed an experimental feature in Visual Studio to offer `@string` `AndroidResource` completion when changing the `Label` property in C#. Unfortunately, the presence of this attribute causes the linker to preserve various dependencies of `System.ComponentModel` in .NET 6. It appears that this completion feature never shipped in the IDE, so we can completely remove this. If we ever want to bring the feature back, we should create a new `internal` attribute to be used instead.
jonathanpeppers
added a commit
to jonathanpeppers/xamarin-android
that referenced
this issue
Dec 7, 2020
…ops (dotnet#2866)" Fixes: dotnet#5373 This reverts commit d548ec9. Decoration of `ApplicationAttribute.Label` with: [System.ComponentModel.Category ("@string")] public string? Label {get; set;} Allowed an experimental feature in Visual Studio to offer `@string` `AndroidResource` completion when changing the `Label` property in C#. Unfortunately, the presence of this attribute causes the linker to preserve various dependencies of `System.ComponentModel` in .NET 6. It appears that this completion feature never shipped in the IDE, so we can completely remove this. If we ever want to bring the feature back, we should create a new `internal` attribute to be used instead. Results of this change: > apkdiff before.apk after.apk Size difference in bytes ([*1] apk1 only, [*2] apk2 only): - 56 lib/armeabi-v7a/libxamarin-app.so Section size difference - 8 .rel.dyn - 12 .data - 6,144 .bss - 77 assemblies/Mono.Android.dll - 3,194 assemblies/System.ComponentModel.Primitives.dll *1 Summary: + 0 Other entries 0.00% (of 6,484) + 0 Dalvik executables 0.00% (of 317,508) - 3,271 Assemblies -0.15% (of 2,139,234) - 56 Shared libraries -0.00% (of 20,674,428) - 3,468 Package size difference -0.04% (of 9,485,287)
jonathanpeppers
added a commit
to jonathanpeppers/xamarin-android
that referenced
this issue
Dec 8, 2020
…ops (dotnet#2866)" Fixes: dotnet#5373 This reverts commit d548ec9. Decoration of `ApplicationAttribute.Label` with: [System.ComponentModel.Category ("@string")] public string? Label {get; set;} Allowed an experimental feature in Visual Studio to offer `@string` `AndroidResource` completion when changing the `Label` property in C#. Unfortunately, the presence of this attribute causes the linker to preserve various dependencies of `System.ComponentModel` in .NET 6. It appears that this completion feature never shipped in the IDE, so we can completely remove this. If we ever want to bring the feature back, we should create a new `internal` attribute to be used instead. Results of this change: > apkdiff before.apk after.apk Size difference in bytes ([*1] apk1 only, [*2] apk2 only): - 56 lib/armeabi-v7a/libxamarin-app.so Section size difference - 8 .rel.dyn - 12 .data - 6,144 .bss - 77 assemblies/Mono.Android.dll - 3,194 assemblies/System.ComponentModel.Primitives.dll *1 Summary: + 0 Other entries 0.00% (of 6,484) + 0 Dalvik executables 0.00% (of 317,508) - 3,271 Assemblies -0.15% (of 2,139,234) - 56 Shared libraries -0.00% (of 20,674,428) - 3,468 Package size difference -0.04% (of 9,485,287)
jonathanpeppers
added a commit
to jonathanpeppers/xamarin-android
that referenced
this issue
Dec 8, 2020
…ops (dotnet#2866)" Fixes: dotnet#5373 Reverts: d548ec9 Decoration of `ApplicationAttribute.Label` with: [System.ComponentModel.Category ("@string")] public string? Label {get; set;} Allowed an experimental feature in Visual Studio to offer `@string` `AndroidResource` completion when changing the `Label` property in C#. Unfortunately, the presence of this attribute causes the linker to preserve various dependencies of `System.ComponentModel` in .NET 6. It appears that this completion feature never shipped in the IDE, so we can completely remove this. If we ever want to bring the feature back, we should create a new `internal` attribute to be used instead. Results of this change: > apkdiff before.apk after.apk Size difference in bytes ([*1] apk1 only, [*2] apk2 only): - 56 lib/armeabi-v7a/libxamarin-app.so Section size difference - 8 .rel.dyn - 12 .data - 6,144 .bss - 77 assemblies/Mono.Android.dll - 3,194 assemblies/System.ComponentModel.Primitives.dll *1 Summary: + 0 Other entries 0.00% (of 6,484) + 0 Dalvik executables 0.00% (of 317,508) - 3,271 Assemblies -0.15% (of 2,139,234) - 56 Shared libraries -0.00% (of 20,674,428) - 3,468 Package size difference -0.04% (of 9,485,287)
ghost
locked as resolved and limited conversation to collaborators
Jun 3, 2022
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
This seems unnecessary at least for netcore builds and based on @jonathanpeppers look it does not seem to work. It'd be better to clean this up not do pull additional unnecessary dependencies.
https://github.com/xamarin/xamarin-android/blob/master/src/Xamarin.Android.NamingCustomAttributes/Android.App/ActivityAttribute.cs#L56
The text was updated successfully, but these errors were encountered: