How to use the Autofac framework correctly in WinForm projects?

problem description

hierarchical decoupling, the most popular third-party open source framework Autofac is very convenient to use on Web projects, just register the controller in MVC"s Application_Start.
but for applications such as WinForm and Console... Console aside, the entry of WinForm is in Program.Main, and new forms are created by direct instantiation, so it seems impossible to inject?

static void Main()
{
    // ....
    Application.Run(new Form1()); //
}

and Autofac are not officially provided with expansion packs such as Autofac.Mvc5 .

so how to correctly use the Autofac framework in WinForm (and Console) projects?

Apr.05,2022
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e4da35-44f3a.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e4da35-44f3a.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?