An announcement from a few weeks ago mentioned that IActionContextAccessor and ActionContextAccessor are being deprecated (starting with .NET 10), which SubresourceIntegrityTagHelper and its child classes make use of (as do a few other classes).
The recommended alternative looks like this, and only requires injecting IHttpContextAccessor
var httpContext = httpContextAccessor.HttpContext;
var endpoint = httpContext?.GetEndpoint();
var actionDescriptor = endpoint?.Metadata.GetMetadata<ActionDescriptor>();
An announcement from a few weeks ago mentioned that
IActionContextAccessorandActionContextAccessorare being deprecated (starting with .NET 10), whichSubresourceIntegrityTagHelperand its child classes make use of (as do a few other classes).The recommended alternative looks like this, and only requires injecting
IHttpContextAccessor