views:

17

answers:

1

I have downloaded the ASP.Net MVC2 RTM source code and I'm trying to run my application against it. For some reason my .ascx controls keep using the non generic ViewUserControl instead of the generic version.

My control includes the following line at the top: Inherits="System.Web.Mvc.ViewUserControl<ExistingApplicationLoginModel>"

If I run the project against the MVC2 dll in the GAC it works perfectly. I'm only having problems when trying to run it against the source.

Has anyone else experienced this problem? How do I fix it?

Thanks for the help in advance.

+1  A: 

I have found the problem. When I changed to using the source code instead of the DLL from the GAC, I changed all references to the MVC DLL to use PublicKeyToken=null instead of the token of the DLL from the GAC.

I forgot to change the references to DLL in the userControlBaseType of the web.config as well. I changed that to

userControlBaseType="System.Web.Mvc.ViewUserControl, System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null"

Everything works now.

Johann Strydom