Enable IL trimming and NativeAOT on AzureKeyVaultProvider #3401
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.
Description
We can safely enable IL trimming and NativeAOT support on the AzureKeyVaultProvider project for the .NET targets. This PR simply sets the
IsTrimmable
andIsAotCompatible
properties.This doesn't enable these features on SqlClient itself, and the addon isn't particularly useful on its own - but when the library itself is compatible, the addon isn't going to hold it back.
Issues
Relates to #1947.
Testing
The IL trimming and NativeAOT support is mostly flagged by compile-time warnings. A sample application which directly references the DLL runs successfully - I can successfully publish and run the code below.
I've not added a unit test - as per dotnet/runtime#97013 this isn't a good way to perform testing.