Skip to content

AOT Compatible Questions #4719

Answered by Scottj1s
ghost1372 asked this question in Q&A
Discussion options

You must be logged in to vote

@ghost1372 The general answer is that if your code compiles warning free, it should execute error free. If the type is known statically at compile time (as it would be with FooType.GetType(), but not necessarily with fooInstance.GetType()), then the code is AOT/Trim safe. As for LibraryImport, the compile may not be warning for DllImport. @manodasanW, do you remember warnings in gallery that required use LibraryImport?

See also:
https://devblogs.microsoft.com/dotnet/creating-aot-compatible-libraries/

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by ghost1372
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants