-
Notifications
You must be signed in to change notification settings - Fork 5k
System.Runtime.Caching is not AOT compatible and isn't annotated #102341
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
Comments
This looks like a trimming issue, not AOT issue. The exception is in ConfigurationManager. Looks like we didn't annotate it as such, and closed the underlying issue as by design :(. Lines 6 to 8 in efde006
|
@eerhardt, is this something that needs to be addressed in .NET 9? |
No, it doesn't "need" to be addressed in .NET 9. The benefit of doing this work is that consumers using System.Runtime.Caching in trimmed/AOT apps/libraries would get warnings sooner in their development process - i.e. during "build", instead of at the end when they publish the app. |
Thanks. As #75480 is now in the 10.0 milestone, I'm moving this to the 10.0 milestone as well. If this is in the same camp as the other items in that issue, should this instead be closed and a line item added to that one? |
This one was presumably actually hit by someone. #75480 is tracking leftover work that nobody ran into yet and we're likely going to kick from one milestone to another for years to come, unless the work gets funded. This one feels higher priority than that. |
Correct. This was hit by a team in Microsoft using native AOT. |
Tagging subscribers to this area: @dotnet/area-system-configuration |
Using the following project:
When you
dotnet build
you don't get any warnings thatMemoryCache
isn't going to work in a trimmed or AOT'd application.However, when you
dotnet publish
the project, you do get a warning:Then when you run the resulting
.exe
it fails with:We should either make System.Runtime.Caching work with trimming/native AOT, or annotate it as incompatible with trimming.
This is related to #75480, but I didn't see
System.Runtime.Caching
in the list on that issue.cc @agocke @LakshanF @MichalStrehovsky
The text was updated successfully, but these errors were encountered: