Skip to content
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

[Xamarin.Forms] expected class 'System.nfloat' in assembly 'Xamarin.iOS' #6

Closed
TimLariviere opened this issue Jan 26, 2022 · 4 comments
Labels
bug Something isn't working

Comments

@TimLariviere
Copy link
Member

TimLariviere commented Jan 26, 2022

XF iOS project does compile and run, but crashes with this error:

Could not register the assembly 'Xamarin.Forms.Platform.iOS': System.TypeLoadException: Could not resolve type with token 0100005d from typeref (expected class 'System.nfloat' in assembly 'Xamarin.iOS, Version=0.0.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065')
   at System.Reflection.MonoMethodInfo.GetMethodInfo(IntPtr handle)
   at System.Reflection.RuntimeMethodInfo.GetPseudoCustomAttributes()
   at System.Reflection.CustomAttribute.GetPseudoCustomAttributes(ICustomAttributeProvider obj, Type attributeType)
   at System.Reflection.CustomAttribute.GetCustomAttributesBase(ICustomAttributeProvider obj, Type attributeType, Boolean inheritedOnly)
   at System.Reflection.CustomAttribute.GetCustomAttributes(ICustomAttributeProvider obj, Type attributeType, Boolean inherit)
   at System.Reflection.RuntimeMethodInfo.GetCustomAttributes(Type attributeType, Boolean inherit)
   at Registrar.SharedDynamic.GetOneAttribute[ExportAttribute](ICustomAttributeProvider provider)
   at Registrar.DynamicRegistrar.GetExportAttribute(MethodBase method)
   at Registrar.Registrar.RegisterTypeUnsafe(Type type, List`1& exceptions)
   at Registrar.Registrar.RegisterAssembly(Assembly assembly)

Might be related to xamarin/xamarin-macios#13087

@TimLariviere
Copy link
Member Author

TimLariviere commented Jan 26, 2022

Fixing it would mean recompiling Xamarin.Forms.Platform.iOS against net6.0-ios
Meaning we would need to make our own fork of Xamarin.Forms

@edgarfgp
Copy link
Member

I saw a related discussion on twitter . https://twitter.com/praeclarum/status/1480583047833550848?s=21

@edgarfgp
Copy link
Member

Looks like there is version of Xamarin.Forms that works on Net 6 https://twitter.com/praeclarum/status/1480939068930158595?s=21

@TimLariviere TimLariviere added the bug Something isn't working label Jan 27, 2022
@TimLariviere
Copy link
Member Author

TimLariviere commented Jan 27, 2022

I tried this port, but still have the same issue

It does work after cleaning obj/bin!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants