出现System.web.mvc冲突的原因及解决方法CS0433

1.问题描述

CS0433:类型“System.Web.Mvc.WebViewPage”同时存在于URL1和URL2中

2.解决方案



找到Web.config文件中的<System.web>
<system.web>
1
<pre>   <span class="kwrd"><<span class="html">compilation <span class="attr">debug<span class="kwrd">="true" <span class="attr">targetFramework<span class="kwrd">="4.0"<span class="kwrd">></span></span></span></span></span></span></span>


    <assemblies>
1
<pre>      <span class="kwrd"><<span class="html">add <span class="attr">assembly<span class="kwrd">="System.Web.Abstractions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" <span class="kwrd">/></span></span></span></span></span>


      <add assembly=”System.Web.Helpers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35” />
1
<pre>      <span class="kwrd"><<span class="html">add <span class="attr">assembly<span class="kwrd">="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" <span class="kwrd">/></span></span></span></span></span>


        
感谢支持原创技术分享
显示 Gitment 评论