maui: [regression/8.0.0-preview.1.7762] .NET 8 RC1 cannot use Syncfusion controls - SfListView gives System.TypeLoadException
Description
When trying to use SfListView in MAUI .NET 8 you get the following exception and the app crashes instantly.
System.TypeLoadException: ‘Could not resolve type with token 010001d8 from typeref (expected class ‘Style’ in assembly ‘’)’
I have added a dummy project here https://github.com/Zack-G-I-T/SfListView.Net8Bug
Steps to Reproduce
- Run repo with all exceptions on
- See exception
Link to public reproduction project repository
https://github.com/Zack-G-I-T/SfListView.Net8Bug
Version with bug
8.0.0-preview.7.8842
Is this a regression from previous behavior?
Yes, this used to work in .NET MAUI
Last version that worked well
7.0.92
Affected platforms
Android
Affected platform versions
Android 13
Did you find any workaround?
No
Relevant log output
System.TypeLoadException: 'Could not resolve type with token 010001d8 from typeref (expected class 'Style' in assembly '')'
About this issue
- Original URL
- State: closed
- Created 10 months ago
- Comments: 28 (19 by maintainers)
Commits related to this issue
- WIP repro/test for dotnet/maui#17265 Context: https://github.com/dotnet/maui/issues/17265 — committed to jonathanpeppers/xamarin-android by jonathanpeppers 9 months ago
- [WIP] attempt to fix dotnet/maui#17265 Context: https://github.com/dotnet/maui/issues/17265 Reproduced the issue in a new `FixLegacyResourceDesignerStep` test. It crashes at runtime, but if you chan... — committed to jonathanpeppers/xamarin-android by jonathanpeppers 9 months ago
- [Xamarin.Android.Build.Tasks] Fixup indirect resource references (#8416) Fixes: https://github.com/dotnet/maui/issues/17265 Context: dc3ccf28cdbe9f8c0a705400b83c11a85c81a980 Context: https://gith... — committed to xamarin/xamarin-android by jonathanpeppers 8 months ago
- [Xamarin.Android.Build.Tasks] Fixup indirect resource references (#8416) Fixes: https://github.com/dotnet/maui/issues/17265 Context: dc3ccf28cdbe9f8c0a705400b83c11a85c81a980 Context: https://gith... — committed to xamarin/xamarin-android by jonathanpeppers 8 months ago
- [Xamarin.Android.Build.Tasks] Fixup indirect resource references (#8416) Fixes: https://github.com/dotnet/maui/issues/17265 Context: dc3ccf28cdbe9f8c0a705400b83c11a85c81a980 Context: https://gith... — committed to xamarin/xamarin-android by jonathanpeppers 8 months ago
This is released now:
Hi @jonathanpeppers - i would like to report back that i have tested this new release and it has resolved the issue - thanks everyone for the effort on this as it was a show stopper 😃
@samhouts - I did think at the beginning that were 2 diff issues- does not matter now, the important thing is that .net 8 has broken compatability with .net 7 and has left us in a really bad place like the author of this thread and I bet there will be many that use syncfusion controls that will have the same problem. We cannot move to .net 8 till Syncfusion fixes the issues, which they wont till you go stable as part of the policy… Any suggestions?
Hi @jonathanpeppers i tried AndroidUseDesignerAssembly but got the following compile error instead:
2>C:\Program Files\dotnet\packs\Microsoft.Android.Sdk.Windows\34.0.0-rc.2.468\tools\Xamarin.Android.Resource.Designer.targets(146,3): error XA1034: Your project references ‘C:\Users\michaelo.nuget\packages\inputkit.maui\4.4.0-pre.1\lib\net8.0-android34.0\InputKit.Maui.dll’ which uses the
_Microsoft.Android.Resource.Designerassembly, but you do not have this feature enabled. Please set theAndroidUseDesignerAssemblyMSBuild property totruein your project file.So at this stage with rc2 I cannot run with maui on android until a patch is released - I can run on IOS.