[release/8.0] Suppress IL3000 in MsQuicApi constructor #109965
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.
A call to
Assembly.Location
was added in a recent fix. It hasIL30000
suppressed via#pragma warning disable
, but that only applies to the compilation of the library itself. Consumers will hit it when doing something like publishing their app as NativeAOT.This change adds an
[UnconditionalSuppressMessage]
to theMsQuicApi
static constructor such thatIL30000
should also be suppressed for apps consuming the runtime.Customer Impact
Customers are seeing a warning when NativeAoT compiling applications relying on HttpClient. Many customers also use option to treat warning as errors and thus are unable to build their applications without suppressing the warning.
Available workarounds are either
Regression
Regression against previous release. The same issue has discovered for 9.0 GA release and fixed before final build was created. However, the fix was not backported to 8.0.
Testing
The same change is present as part of 9.0 builds where the regression does not reproduce.
Risk
Low, no functional change, the issue pointed to by the warning is already correctly handled at runtime.