MVC - strongly typed views are broken
So I wrote a custom web control in MVC, and I did the whole csc thing to create a dll out of it.
That didn't work, but when I removed it and everything. My MVC thing broke, and it's giving me this error:
Parser Error Message: Could not load type 'System.Web.Mvc.ViewPage'.
for this line:
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master"
Inherits="System.Web.Mvc.ViewPage<List<className>>" %>
It's not liking strongly typed view now (normal views are working okay)! I'm not registering the dll anywhere anymore. I deleted the dll from bin. I even got rid of the class.
<compilation debug="true">
<assemblies>
<开发者_运维知识库add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=gibberish"/>
<add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=gibberish"/>
<add assembly="System.Web.Abstractions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=gibberish"/>
<add assembly="System.Web.Routing, Version=3.5.0.0, Culture=neutral, PublicKeyToken=gibberish"/>
<add assembly="System.Web.Mvc, Version=1.0.0.0, Culture=neutral, PublicKeyToken=gibberish"/>
<add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=gibberish"/>
<add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=gibberish"/>
<add assembly="System.Data.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=gibberish"/>
</assemblies>
</compilation>
Check your web.config for this assembly line under compilation:
<compilation debug="true" targetFramework="4.0">
<assemblies>
<add assembly="System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken="gibberish" />
</assemblies>
</compilation>
精彩评论