A call to Assembly.Location was added in a recent fix. It has IL30000 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 the MsQuicApi static constructor such that IL30000 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
revert to previous release
suppress the warning (and remember to unsuppress it once fix is released)
update to .NET 9.0 (may not be possible, some customers need to stay on LTS release versions)
Regression
[x] Yes
[ ] No
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.
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.