.Net: Make Core package AOT compatible #9079
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation, Context and Description
This PR adds a new AOT-compatible API to the SK Core package and refactors existing functionality to make it AOT-compatible.
99% of the changes involve new AOT-friendly overloads of methods to create, add, or import plugins/functions that accept JsonSerializerOptions (JSOs) as a parameter. JSOs are required for the generation of plugins' functions schema, deserialization for functions' parameters and return values marshaling, and serialization for telemetry purposes. The remaining changes are related to making the vector store functionality AOT-friendly and updating the test application to reference the Core package for AOT compiler analysis.