Maui .Net 8 XCode 15.1 and 15.2 NativeAOT Error in Testflight

Grant Schaffer 25 Reputation points
2024-04-19T16:55:14.02+00:00

Hello,

I have an Maui app built with XCode 15.2 and .Net 8.

I am using Microsoft.EntityFrameworkCore.Sql V8.0.4

When I install it on my iPad with test flight I get:

Model binding is not supported when publishing with NativeAOT. Use a compiled model.

I have also tried using xcode 15.1 with the same results.

What am I doing wrong?

Thanks in advance.

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
749 questions
.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
3,579 questions
0 comments No comments
{count} votes

Accepted answer
  1. Bruce (SqlWork.com) 66,061 Reputation points
    2024-04-21T15:11:22.8666667+00:00

    NativeAOT is part of the Maui build, and not Xcode. NativeAOT, places several limitations on your coding. Your code has broken one of these limitations. See:

    https://learn.microsoft.com/en-us/dotnet/core/deploying/native-aot/?tabs=net7%2Cwindows

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

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.