autofac / Autofac

An addictive .NET IoC container
https://autofac.org
MIT License
4.44k stars 836 forks source link

Support 8.0 #1383

Closed kfrancis closed 1 year ago

kfrancis commented 1 year ago

Problem Statement

As .NET MAUI's generally pretty wonky to work with, we're trying to stay on the bleeding edge to take advantage of the latest fixes but that currently requires net8.0 and the latest supported from autofac is net7.0 leading to exceptions like this:

6n5u2-1686756558-112918

Desired Solution

Can there be some prelim support for the .net8.0 framework? It's due to be released in November 2023, so it would be nice to get some support there. It does look like there have been some beta releases related to .net core support historically, so this would be along the same lines.

Alternatives You've Considered

None, we can't force this to work.

Additional Context

We were looking at this blog post and see that some of the bugs stopping our production app from being that much closer might have been addressed but on trying we're not able to load the app due to autofac issues. The app works without the error in net7.0, but fails when moving to net8.0.

tillig commented 1 year ago

A general DependencyResolutionException doesn't actually tell us that adding .NET 8 support will fix anything. For all we know, you wired something up wrong in your app and adding .NET 8 wouldn't fix it. Unfortunately, due to limited time, I can't promise any sort of early builds or beta support here.

kfrancis commented 1 year ago

True, but regardless of the issue I'm experiencing it would still be nice to be able to use autofac in .net8.0 before the release in November.

tillig commented 1 year ago

You can totally use Autofac in .NET 8, just like you can use other libraries that don't explicitly target .NET 8 in .NET 8. Each new .NET version is backwards-compatible, runtime-wise, with the previous. Libraries don't have to target every version of .NET that gets released.

tillig commented 1 year ago

Based on #1385 we may have a technical requirement to update to .NET 8 to support some new language features, which is one of the reasons we'd make such an upgrade. I'll close this issue for now since it may happen as a byproduct of needing to support new .NET 8 features.