-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Suddenly, iOS crashes with “Model building is not supported when publishing with NativeAOT. Use a compiled model” #23653
Comments
Hi I'm an AI powered bot that finds similar issues based off the issue title. Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you! Open similar issues:
Closed similar issues:
|
Have you tried the workaround mentioned in #23577 (comment)? If it works for you, we can perhaps close this as a duplicate. Thanks! |
@samhouts yes, adding
solved the problem for now. thank you. |
Duplicate of #23577 |
I am still seeing this issue with EFCore 8 and the following in my maui csproj: <PropertyGroup Condition="$(TargetFramework.Contains('-ios')) and '$(Configuration)' == 'Release'">
<ArchiveOnBuild>true</ArchiveOnBuild>
<MtouchInterpreter>all</MtouchInterpreter>
<PublishAot>false</PublishAot>
</PropertyGroup> When building for release (only) i get the following exception at runtime:
|
@Axemasta try adding |
That did the trick! added bonus my |
Great to hear! |
Description
We have been working on an Android and iOS app for the last year or so and suddenly (somewhere around the 9th of July) our iOS began to break right on the EF Core initialization with the error "Model building is not supported when publishing with NativeAOT. Use a compiled model".
However, if we travel back in time and install a release via AppCenter prior that date everything works fine, but if the pull some code before that date and build it now, publish via AppCenter and install it on device the app crashes right away.
The iOS publish section for Releases are the following:
We were on Ef-Core 8.0.2 but neither bumping it to 8.0.7 or downgrading (as some other suggested) to 8.0.1 helped in this case. I have read somewhere, that compiled models are not even supported on .NET 8, which adds up to the confusion.
We are building with Xcode 15.2 on Azure Pipelines. The Debug build works without any problems.
Android is still working fine and has no problems at all.
Steps to Reproduce
No response
Link to public reproduction project repository
No response
Version with bug
8.0.70 SR7
Is this a regression from previous behavior?
Yes, this used to work in .NET MAUI
Last version that worked well
8.0.20 SR4
Affected platforms
iOS
Affected platform versions
iOS 17.5.1
Did you find any workaround?
No.
Relevant log output
No response
The text was updated successfully, but these errors were encountered: