Note that there are some explanatory texts on larger screens.

plurals
  1. POASP.NET MVC Upgrade to Beta: IControllerFactory is defined in an assembly that is not referenced
    primarykey
    data
    text
    <p>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:</p> <pre><code>ControllerBuilder.Current.SetControllerFactory(typeof(WindsorControllerFactory)); </code></pre> <p>The compiler is complaining that:</p> <pre><code>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'. </code></pre> <p>The weird thing is that this assembly <strong>is</strong> 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.</p> <p>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?</p> <p>Thanks for reading, Brett</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload