Autofac MultiTenant with ASP.NET MVC3

2019-08-09 22:38发布

问题:

Which version of Autofac supports MultiTenant for ASP.NET MVC 3? I could find this for ASP.NET MVC 4

回答1:

The last version of Autofac released that supported MVC3 was 2.6.3. Not all packages were released on NuGet at that time; that happened starting with 3.0. The last time the Contrib packages (which contain the multitenant library) were released on the 2.6 line was 2.6.1.

If you need an MVC3 stack, you'll need to go to the Autofac download list, switch the search filter to "Deprecated Downloads" and search for "contrib" - pick the latest version you can find of the contrib packages. It looks like 2.6.1 is it. Then search for "2.6.1" to find the corresponding core assemblies.

Autofac has a general policy of staying current, so as new MVC releases are put out, older releases stop getting direct support. There is no version of Autofac 3.0 that has MVC3 support and there is no plan to back-port functionality.

Note that the multitenant support isn't specific to a project type. It is a single library that supports any application type. What you really want is a version of Autofac that supports MVC3 and has a corresponding build of the multitenant plugin library. Hopefully the instructions above provide that.