views:

629

answers:

4

Hi, I'm currently in the process of updating a site from preview 2 of ASP.NET MVC to the Beta release. I'm down to my last compile error with no solution in site after an exhaustive search. I have some code in Global.asax.cs which sets up IOC using the Windsor container:

ControllerBuilder.Current.SetControllerFactory(typeof(WindsorControllerFactory));

The compiler is complaining that:

The type 'System.Web.Mvc.IControllerFactory' is defined in an assembly that is not referenced. 
You must add a reference to assembly 'System.Web.Mvc, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.

The weird thing is that this assembly is referenced. I reference it from the MVC beta assemblies folder and set to copy local. I can even delete the bin directory, rebuild, then view the assembly in reflector and see the interface. I've tried removing and re-adding the reference, changing web.config's assemblies and namespace sections. I even removed System.Web.Mvc from the GAC to make sure it was using the correct copy.

While writing this question it occurred to me that perhaps Windsor is internally expecting the older version of the assembly. I'm downloading the latest from MvcContrib to determine if this is the issue and I'll post the result. If this is the case, shouldn't the version number of the assembly have changed with the latest release to make this obvious?

Thanks for reading, Brett

+1  A: 

Check that you've updated the appropriate assembly references to 3.5.0.0 in your web.config file, as described in the update notes for the beta.

Mike Scott
Thanks for the quick response, but I had already tried that one.
Brehtt
Also, System.Web.Mvc still seems to be at version 1.0.0.0
Brehtt
+2  A: 

PublicKeyToken=null doesn't seem right...

Edit: I was right, the PublicKeyToken should be "31bf3856ad364e35". It sounds like they're linked against a private build of System.Web.Mvc.dll that isn't signed.

Brad Wilson
A: 

Yep MvcContrib was the problem... sigh

Thanks for posting responses so quickly though :)

Brehtt
A: 

Hi there

Following up this, I've replaced the web.config as follow:

and I got the error:

HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.

Any ideas?