kanayabhattad / autofac

Automatically exported from code.google.com/p/autofac
Other
0 stars 0 forks source link

Updating dependency of NuGet Autofac packages to 3.0.x breaks Autofac.MVC3 integration #448

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Nuget offers me to update Autofac package version "2.6.3.862" to Autofac 
package version "3.0.2".
I don't see an update for the Autofac.MVC3 package.

After upgrading and running my website i receive the exception below.

Possible solution would be on your side:
1. make the new version of the base autofac package 3.X also working with 
"legacy" MVC 3 application
2. release a new nuget package of Autofac.MVC3 which fixates the version number 
dependancy of the core Autofac package to below 3.x.
3. give guidance in the wiki how to work around/fix the issues without 
releasing any new package

What version of Autofac are you using? On what version of .NET/Silverlight?

.Net 4.0 with MVC3

After calling this:

builder.RegisterAssemblyTypes(typeof(IAuthenticationService).Assembly)
                            .Where(t => t.Name.EndsWith("Service"))
                            .AsImplementedInterfaces()
                            .InstancePerHttpRequest();

I receive that:

System.MissingMethodException was unhandled by user code
  HResult=-2146233069
  Message=Method not found: 'Autofac.Builder.IRegistrationBuilder`3<!0,!1,!2> Autofac.Builder.IRegistrationBuilder`3.InstancePerMatchingLifetimeScope(System.Object)'.
  Source=Autofac.Integration.Mvc
  StackTrace:
       at Autofac.Integration.Mvc.RegistrationExtensions.InstancePerHttpRequest[TLimit,TActivatorData,TStyle](IRegistrationBuilder`3 registration)
       at SystemControlCenter.MvcApplication.RegisterObjects(ContainerBuilder builder) in d:\Development\SCCProjectInspiration\SystemControlCenter\SystemControlCenter\Global.asax.cs:line 126
       at SystemControlCenter.MvcApplication.ContainerSetup() in d:\Development\SCCProjectInspiration\SystemControlCenter\SystemControlCenter\Global.asax.cs:line 113
       at SystemControlCenter.MvcApplication.Application_Start() in d:\Development\SCCProjectInspiration\SystemControlCenter\SystemControlCenter\Global.asax.cs:line 93
  InnerException: 

Original issue reported on code.google.com by mikepodonyi on 3 Jul 2013 at 3:02

GoogleCodeExporter commented 8 years ago
Releasing an update to the MVC3 package with a dependency on the 2.6 package is 
definitely the best solution.

Original comment by alex.meyergleaves on 4 Jul 2013 at 12:53

GoogleCodeExporter commented 8 years ago
Given the time we have available to allocate to fixes and the desire to keep 
moving forward rather than fixing previous releases, I don't think we'll be 
releasing an updated version of the MVC3 integration. Sorry.

Original comment by travis.illig on 3 Sep 2013 at 2:42