Andrew Casey

Results 279 comments of Andrew Casey

This isn't my area, but my immediate reaction is that a 5.0 project (out-of-support) using Autofac 7.1 (from 2020, but not officially deprecated) is probably not a top priority. If...

From the stack, it appears that `TryFindPreferredConstructor` failed so it's using `TryFindMatchingConstructor`. There are two constructors and the single argument type is `Microsoft.AspNetCore.Http.RequestDelegate`.

Inspecting the signatures, it looks like there should also be an `IOptions`. Edit: this appears to be the same in P7, so it's probably a red herring.

This difference seems interesting to me (I picked a different middleware type that _isn't_ broken): ``` RC1 > Microsoft.AspNetCore.HttpsPolicy.dll!Microsoft.AspNetCore.HttpsPolicy.HttpsRedirectionMiddleware.HttpsRedirectionMiddleware(Microsoft.AspNetCore.Http.RequestDelegate next, Microsoft.Extensions.Options.IOptions options, Microsoft.Extensions.Configuration.IConfiguration config, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory) Line 36 C# [Lightweight...

I updated to autofac 8 and I no longer see the exception. Can you please confirm, @Junjun-zhao? Edit: 7.2 seems to work as well. Confirmed that downgrading to 7.1 brings...

The [internal](https://github.com/dotnet/aspnetcore/blob/f22b35078a992e4bff2429f517e28a30907689cb/src/Shared/ActivatorUtilities/ActivatorUtilities.cs#L40) `ActivatorUtilities` used match length as a tie-breaker, whereas the ["official"](https://github.com/dotnet/runtime/blob/ce8f49e658d4a31e5708f0c06efa39784ee7c1ad/src/libraries/Microsoft.Extensions.DependencyInjection.Abstractions/src/ActivatorUtilities.cs#L616) one does not.