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 aga开发者_如何学运维inst the source.
Has anyone else experienced this problem? How do I fix it?
Thanks for the help in advance.
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.
精彩评论