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

AOT + Trim - Could not resolve type with token 01000005 from typeref #21082

Closed
UkeHa opened this issue Mar 7, 2024 · 1 comment
Closed

AOT + Trim - Could not resolve type with token 01000005 from typeref #21082

UkeHa opened this issue Mar 7, 2024 · 1 comment
Labels
platform/android 🤖 t/bug Something isn't working

Comments

@UkeHa
Copy link

UkeHa commented Mar 7, 2024

Description

When i enable AOT and Trim in my project i run into this error. Disabling both options let the app run as intended. All projects inside the solution are on .net8 and bin/obj folders have been deleted to force rebuild. How do i fix this?

Steps to Reproduce

No response

Link to public reproduction project repository

No response

Version with bug

8.0.7 SR2

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

Unknown/Other

Affected platforms

Android

Affected platform versions

No response

Did you find any workaround?

no

Relevant log output

'Could not resolve type with token 01000005 from typeref (expected class 'System.Runtime.CompilerServices.InternalsVisibleToAttribute' in assembly 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51')'
@UkeHa UkeHa added the t/bug Something isn't working label Mar 7, 2024
@drasticactions
Copy link
Contributor

drasticactions commented Mar 7, 2024

The short answer is that MAUI (The UI Framework) is currently not NativeAOT friendly. It's being tracked for .NET 9. Currently, AFAIK, the only platform that could "fully" support compiling with NativeAOT would be Apple platforms (iOS/Mac Catalyst, etc). WinUI doesn't support NativeAOT and Android currently supports it for native code, but with no Java interop.

@github-actions github-actions bot locked and limited conversation to collaborators Apr 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
platform/android 🤖 t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants