2011-02-04 31 views
0

我尝试使用MVCContrib的便携式区域。 通常这些工作很好,它似乎是在Web项目之间共享控制器\视图的好方法。MVCContrib便携式区域无查看页面的智能感知<T>

我遇到的唯一问题是Intellisense(特别是对于HtmlHelper)在强类型视图(即ViewPage)中无法工作。 智能感知不工作然而,当视图是一个普通的“醇System.Web.Mvc.ViewPage

类似的问题已经在这里问: MvcContrib Portable Areas View Intellisense?

,但似乎这些建议不作任何区别。

我正在使用MVC 2,便携式领域是在他们自己的类库中,如MVCContrib示例代码。 我还想补充一点,MVC示例代码给了我相同的行为,如果我更改示例项目使强制键入视图页,然后智能感知停止工作。

其他人是否有同样的问题?

有谁知道原因和解决方案?

从我的浏览文件夹中的web.config如下:

<?xml version="1.0"?> 
<configuration> 
    <system.web> 
    <httpHandlers> 
     <add path="*" verb="*" 
      type="System.Web.HttpNotFoundHandler"/> 
    </httpHandlers> 

    <!-- 
     Enabling request validation in view pages would cause validation to occur 
     after the input has already been processed by the controller. By default 
     MVC performs request validation before a controller processes the input. 
     To change this behavior apply the ValidateInputAttribute to a 
     controller or action. 
    --> 
    <pages 
     validateRequest="false" 
     pageParserFilterType="System.Web.Mvc.ViewTypeParserFilter, System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" 
     pageBaseType="System.Web.Mvc.ViewPage, System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" 
     userControlBaseType="System.Web.Mvc.ViewUserControl, System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"> 
     <controls> 
     <add assembly="System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" namespace="System.Web.Mvc" tagPrefix="mvc" /> 
     </controls> 
    </pages> 
    </system.web> 

    <system.webServer> 
    <validation validateIntegratedModeConfiguration="false"/> 
    <handlers> 
     <remove name="BlockViewHandler"/> 
     <add name="BlockViewHandler" path="*" verb="*" preCondition="integratedMode" type="System.Web.HttpNotFoundHandler"/> 
    </handlers> 
    </system.webServer> 
</configuration> 
+0

编辑,抱歉,链接有误,只是更改了 – nixon 2011-02-04 09:40:43

回答

0

这是在VS2010 ReSharper的智能感知,ReSharper的V5.0的一个问题。 如果我改变我的ReSharper选项(ReSharper-> Options-> Intellisense-> General)以使用Visual Studio intellisense,那么它的工作原理!