Open
Description
Android framework version
net9.0-android
Affected platform version
VS 2022, Dotnet Maui 9.102, CommunityTookit Camera
Description
I am trying to figure out how to fix the Maui Community toolkit Camera package. When in debug mode everything works as expected. In Release mode the Zoom in and out do not work. I have isolated it to the sample app trimming out Xamarin.AndroidX.Camera.Core
. Adding this to sample app project fixes the bug
<ItemGroup Condition="$(TargetFramework.Contains('-android'))">
<TrimmerRootDescriptor Include="ILLink.Descriptors.xml"/>
</ItemGroup>
The ILLink.Descriptors.xml
<?xml version="1.0" encoding="UTF-8" ?>
<linker>
<assembly fullname="Xamarin.AndroidX.Camera.Core" />
</linker>
I would prefer to fix the trimming issue and not have to rely on having to ask consumers of a nuget package to add a TrimmerRootDescriptor xml file to csproj. I have included the build Android-arm64 linked folder as a zip file.
Steps to Reproduce
- Run this project. https://github.com/CommunityToolkit/Maui/tree/main/samples
- Goto Views, open the camera app in Release mode.
- Set zoom slider or click to zoom in and out.
- Issue is that zoom in and out does not work. Everything else works fine.
- Issue does not occur in Debug mode.
Did you find any workaround?
Add a ILLinkDescriptors.xml to sample app and that fixes it. Prevent Xamarin.AndroidX.Camera.Core
from being trimmed.
Activity