Questions Regarding Native AOT

Atul Nikam 0 Reputation points
2024-05-07T09:16:41.31+00:00

Hi Team ,

I have few queries regarding Native AOT compilation .

  1. is Native AOT is recommended for security - to avoid reverse engineering ?
  2. Can Native AOT published library be called from managed C# code ?
  3. is there any future plans of making Native AOT possible for WPF out of the box ?
  4. Can complex structure like DataTable/DataSet be marshalled to pass from Native AOT to managed C# ?

Thanks !

Developer technologies | C#
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Anonymous
    2024-05-07T11:30:35.8+00:00

    Hi @Atul Nikam ,Welcome to Microsoft Q&A,

    Using native ahead-of-time (AOT) compilation may be a way to improve security because it makes it more difficult to reverse engineer the code because the compiled code is more messy than traditional JIT (just-in-time) compilation. However, it is important to note that there is no way to completely prevent reverse engineering.

    Yes, you can call native AOT-published libraries from managed C# code.

    Microsoft will regularly update its development roadmap. Please pay attention to official announcements. This forum does not support this.

    Yes, complex structures such as DataTables and DataSets can be marshalled to be passed from native AOT to managed C# code. However, you may need to write custom marshaling code or use appropriate interop mechanisms to handle these complex types efficiently.

    Best Regards,

    Jiale


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment". 

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.