Which part of Session is incompatible with NativeAOT? #62906
Unanswered
josephmoresena
asked this question in
Q&A
Replies: 1 comment
-
It's very possible it just wasn't updated as part of making ASP.NET Core trimmable/aot friendly. If you look at the change history we marked a bunch of APIs this way in April 2023. Later that year we did a bunch of trimming/aot work, including DataProtection (which Session uses) in May 2023. See https://github.com/dotnet/aspnetcore/blob/main/docs/Trimming.md for some information on what we'd need to do if we removed the attribute to make sure it works. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
While reviewing Native AOT compatibility, I saw that it mentions the
Session
object is not supported with NativeAOT. I've noticed that theAddSession
extension is marked withRequiresUnreferencedCode
, but I'm not exactly sure what it handles dynamically.I've been able to verify that
Session
does work with Native AOT using the following setup:Is this incorrect? Could it stop working at some point? I’m only storing and retrieving text and bytes in the session object.
Beta Was this translation helpful? Give feedback.
All reactions